[2.0.x] How to copy logistics network state of an inserter
Posted: Wed Dec 11, 2024 2:30 am
I have an inserter and I can read its state by requesting its LuaInserterControlBehavior calling 'entity.get_or_create_control_behavior()'.
Most of the fields are RW, with the exception of logistic_condition and connect_to_logistic_network. How do I set that state on a new inserter?
I am currently trying to just copy old.logistic_condition.condition into new.logistic_condition (thus bypassing the read-only new.logistic_condition.
For connect_to_logistic_network I found no workaround. One can not assign the logistic_network attribute in the inserter entity ("Entity is not a Logistic or Construction Robot" - crash)
Is it possible to duplicate the state of an inserter? In 1.x, those fields were RW.
Most of the fields are RW, with the exception of logistic_condition and connect_to_logistic_network. How do I set that state on a new inserter?
I am currently trying to just copy old.logistic_condition.condition into new.logistic_condition (thus bypassing the read-only new.logistic_condition.
For connect_to_logistic_network I found no workaround. One can not assign the logistic_network attribute in the inserter entity ("Entity is not a Logistic or Construction Robot" - crash)
Is it possible to duplicate the state of an inserter? In 1.x, those fields were RW.