The most unhinged ways to transport items and yourself around your factory. Fling items around with Thrower Inserters, launch your trains off ramps, and soar through your base on electric ziplines!
Huh never knew those were different events. I forgot about building by bots, back of my mind I must have figured on_entity_built covered any time an entity was built. Thanks buddy :)
I've never used github though I'm sure I could figure it out. I think you can see the source code from the downloaded zip. What advantage does using github provide?
Probably a good idea to also listen to on_entity_cloned, and perhaps script_raised_destroy for removing. there's a good number of mods that use cloned to transfer items between surfaces.
Removing should be fine since you don’t take special action on mining. But I forget to mention script_raised_revive, which is what things like Construction Drones use.
Wasn't sure if he kept a list of inserters/player launchers in a table or anything. I haven't looked into his code, just been enjoying the pure memelording.
I didn't actually look at how player launchers are handled. Inserters are in a table, but they're checked for validity during an on_tick handler and cleaned up there, so they don't need any handling when mined.
That seems like a waste of performance. If you have a bunch of them all over the map, constantly checking if each one is valid is wasted cycles, if you don't just properly handle them when they're removed, or check them for valid before use.
Ah. I suppose that makes sense. Inserters have always seemed funky to me, and I've seen enough mods that abuse "on tick" and end up being massive performance sinks for minor functions.
I don't know much about optimizing code, I only really cared about making it work (copied a lot from the Robot Army mod for keeping track of and running the throwers) but from what you're saying it sounds like what I wrote is actually not too bad so hey I'll take it lol.
I appreciate all your recommendations too, I could always use the expertise