Hi, I'm making my first mod, which auto-layouts a field of oil-wells. I'm considering auto-adding modules to the placed pumpjacks as well. Considering you already have a bunch of logic to determine which modules should be inserted for which kind of building, it might be great if I could rely on your mod for that instead.
The homework I've done so far led me to LuaRemote calls: https://lua-api.factorio.com/latest/LuaRemote.html
So the factorio API seems to play ball on this aproach I have in mind.
And I noticed in your source you already exposed a bit of interfacing: https://github.com/Choumiko/ModuleInserter/blob/ae33156462e3e372b42dd29de73226a96d9dd889/control.lua#L730
But it seems you don't have any exposed functions that are meaningful for my mod. If they exist, could you point me to them? If they don't, would you be interested to add them? Or would you accept a pull request if I added it myself?
From my point of view, my mod's scope ends with placing the ghosts. Ideally I would pass the placed ghost as argument to your mod somehow, and your mod takes over the module insertion from there. Alternatively, I would be interested in querying your mod which modules to add and I could insert them myself, but at least it would abide by the settings the users have made in your mod.