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

Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

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

Post 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.

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

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”