![]() Also, if I do do this, I'll need some way to serialize that list on shutdown, and I'm having trouble untangling how the save/load systems work. It seems like the expected way to do this is to store a list of all entities of this type when they're placed, and clean them up when they're removed (is that true?) but I can't figure out how to do that, nor what exactly I should be storing in a list (positions? actual entity handles?). The latter seems reasonable to me, but I can't find any way to list all entities of a given type (is there one?) ![]() However, this means I'll either need to track every time an item is removed from one of my chests (is that possible? I don't think so) or update all of my chests every once in a while. As near as I can tell it's not possible to add the Request chest UI easily to an existing chest (is that true?), so I was planning to just make another chest with the logistics settings of a Requester chest and let the game code take care of that. I basically want a Requester chest that, at all times, contains exactly the requested items. I'm looking to create a chest that automatically spawns/despawns items inside it for the purpose of testing layouts. So here's a pile of questions! Note that I'm happy to read existing mods in order to find answers, so if your answer is "Mod X does that" then I can probably untangle it from there. I'm working on my first Factorio mod but I'm having trouble figuring out the not-quite-basics of the modding system.
0 Comments
Leave a Reply. |