Robot Replacer

by Peppe

Utility mod to help replace/upgrade bots within a network. Bots in the replacer provider chest are released to the network when a bot of the same type, but different name is found in a roboport. The bots that do not match the provider are removed from the roboport and placed in the logistics storage network. Should work with all modded bots and roboports. *** Megabase warning: Chest is Calculation heavy when any items are in it. Only put bots in it and keep empty to idle efficiently. ***

1 year, 4 months ago
0.14 - 1.1
25.9K

i Performance improvment

3 years ago

Currently, every time the mod "ticks", you are looking for the chests in the map by iterating through all the logistic networks.
If there are thousands of it, a performance drop can be noticed when the search happens.

You should instead use the events for created/destroyed items to register your chests in a cache and use that list when you want to replace bots instead of looking for the chests every time.

Check logistic-signals mod for an example of it that covers pretty much all cases (player/robot placing/removing intities)

New response