[Rseding91][0.14.21] LuaConstantCombinatorControlBehavior Documentation mismatch / Duplicate Field.
Posted: Tue Jan 31, 2017 10:48 am
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.
What I would expect is for the last line to read
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
Code: Select all
b.parameters = newParams