Page 1 of 1

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

Posted: Tue Jan 31, 2017 10:48 am
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 

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

Posted: Sat Feb 04, 2017 7:14 pm
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.

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

Posted: Sat Feb 04, 2017 7:45 pm
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.

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

Posted: Mon Feb 06, 2017 9:21 am
by nullvoid
Ok, Fair enough.

Will the Documentation be changed to reflect this?