Page 1 of 1

[2.0.x] How to copy logistics network state of an inserter

Posted: Wed Dec 11, 2024 2:30 am
by hgschmie
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.

Re: [2.0.x] How to copy logistics network state of an inserter

Posted: Wed Dec 11, 2024 3:59 am
by curiosity
Documentation issue.

Re: [2.0.x] How to copy logistics network state of an inserter

Posted: Wed Dec 11, 2024 4:01 am
by Rseding91
You should l be able to write those values, I don’t know why the docs say they are read only.