Page 1 of 1

Specify extra layer of "parameters={}" in ConstantCombinatorParameters

Posted: Tue Aug 25, 2020 10:37 pm
by sparr
https://lua-api.factorio.com/latest/Lua ... avior.html says that LuaConstantCombinatorControlBehavior.parameters is of type ConstantCombinatorParameters, and https://lua-api.factorio.com/latest/Con ... Parameters says it should be "an array of tables ..."

However, there is an extra layer hidden in there that is only documented in an example elsewhere, at https://lua-api.factorio.com/latest/Lua ... parameters

Namely, the contents of LuaConstantCombinatorControlBehavior.parameters is not an array, it is {parameters=the_array}, so the place you encounter the documented structure of ConstantCombinatorParameters is not at LuaConstantCombinatorControlBehavior.parameters but at LuaConstantCombinatorControlBehavior.parameters.parameters.

Given the age of this behavior I doubt it's to be considered a bug, so this is just a request to clarify the documentation.

Re: Specify extra layer of "parameters={}" in ConstantCombinatorParameters

Posted: Fri Aug 28, 2020 11:13 pm
by Rseding91
Since 1.1 is going to be a breaking change in a lot of ways I went ahead and removed the whole 'parameters.parameters' nonsense for 1.1. So it will just be behavior.parameters.