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

Place to report issues and suggest improvements to the API documentation.
User avatar
hgschmie
Fast Inserter
Fast Inserter
Posts: 114
Joined: Tue Feb 06, 2024 5:18 am
Contact:

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

Post 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.
curiosity
Filter Inserter
Filter Inserter
Posts: 656
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

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

Post by curiosity »

Documentation issue.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15670
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

You should l be able to write those values, I don’t know why the docs say they are read only.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Documentation Improvement Requests”