My search skills have failed me. I'm looking for a way to automate replacing spent battery packs and schall gun pods in trains.
From the API it looks like its possible, but I couldn't find any mod that gives you any way to automatically manipulate vehicle equipment grids.
Does it exist, or will I have to get my coding hat out and write it?
Add/remove items from vehicle equipment grids?
-
- Filter Inserter
- Posts: 530
- Joined: Mon Feb 05, 2018 10:01 am
- Contact:
Re: Add/remove items from vehicle equipment grids?
Unfortunately there's no events like that (no disposable battery, no limited-ammo items by default). It's easy enough to work on an equipment grid (I think one can even iterate over equipment without regards to place in armor). Probably would also need an on_nth_tick event to check for the removal/insertion condition (dead battery, location, item in inventory, whatever). Don't know how disposable batteries normally work, so I have no idea on how that would be managed.
I have mods! I guess!
Link
Link