Add/remove items from vehicle equipment grids?

Looking for a mod? Have a review on a mod you'd like to share?
Post Reply
Illiander42
Filter Inserter
Filter Inserter
Posts: 409
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Add/remove items from vehicle equipment grids?

Post by Illiander42 »

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?

Honktown
Smart Inserter
Smart Inserter
Posts: 1025
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: Add/remove items from vehicle equipment grids?

Post by Honktown »

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

Post Reply

Return to “Questions, reviews and ratings”