[Rseding91][0.14.21] LuaConstantCombinatorControlBehavior Documentation mismatch / Duplicate Field.

This subforum contains all the issues which we already resolved.
Post Reply
nullvoid
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat May 03, 2014 9:53 pm
Contact:

[Rseding91][0.14.21] LuaConstantCombinatorControlBehavior Documentation mismatch / Duplicate Field.

Post by nullvoid »

In the documentation for LuaConstantCombinatorControlBehavior, it claims that the (R/W) parameters field is a single ConstantCombinatorParameters, which is itself an array of tables.

However, it turns out that the parameters field is a table with a single field ALSO called "parameters", which has type ConstantCombinatorParameters.

The following is an excerpt from a mod I am creating, which demonstrates the issue.

Code: Select all

local b = combinator.get_or_create_control_behavior()
newParams = <...> // :: ConstantCombinatorParameters (as per docs, an array of {signal, count, index} )

b.parameters = {parameters = newParams}      // <-- This line
What I would expect is for the last line to read

Code: Select all

 b.parameters = newParams 

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [0.14.21] LuaConstantCombinatorControlBehavior Documentation mismatch / Duplicate Field.

Post by justarandomgeek »

This gets talked about on IRC pretty much everytime someone starts playing with scripting circuits - My understanding is that it's a result of the underlying architecture (and relates to how these things are blueprinted, I beleive), and would be non-trivial to change.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.21] LuaConstantCombinatorControlBehavior Documentation mismatch / Duplicate Field.

Post by Rseding91 »

justarandomgeek wrote:This gets talked about on IRC pretty much everytime someone starts playing with scripting circuits - My understanding is that it's a result of the underlying architecture (and relates to how these things are blueprinted, I beleive), and would be non-trivial to change.
Correct. It's so the data you get from a blueprint about a constant combinatory is the same data you use to create the entity with those values and is the same as you set them directly on a real entity.
If you want to get ahold of me I'm almost always on Discord.

nullvoid
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat May 03, 2014 9:53 pm
Contact:

Re: [0.14.21] LuaConstantCombinatorControlBehavior Documentation mismatch / Duplicate Field.

Post by nullvoid »

Ok, Fair enough.

Will the Documentation be changed to reflect this?

Post Reply

Return to “Resolved Problems and Bugs”