Page 1 of 1

[0.12.32] set_circuit_condition doesn't work on constant combinators

Posted: Mon May 02, 2016 10:28 pm
by Adil
set_circuit_condition function doesn't alter constant combinator's state.
It's unclear whether it should, however, but the following code simply does nothing silently.
If not fixed it'd be good to have at least clear information on that function in docs.
Code
To reproduce

Re: [0.12.32] set_circuit_condition doesn't work on constant combinators

Posted: Mon May 02, 2016 10:44 pm
by Oxyd
LuaEntity::set_circuit_condition epects parameters to be just one ConstantCombinatorParameters, yet you appear to be passing an array of them.

I think the documentation is quite clear in this regard. If you can propose an exact wording to make this more obvious, I might add it there.

Moving to Not a Bug.

Re: [0.12.32] set_circuit_condition doesn't work on constant combinators

Posted: Mon May 02, 2016 10:47 pm
by Rseding91
Are you sure your code is correct? It works perfectly for me and in fact we have tests to ensure it stays working:

Code: Select all

/c game.player.selected.set_circuit_condition(1, {parameters={{signal={type="item",name="steel-chest"},count=69,index=1}}})

Re: [0.12.32] set_circuit_condition doesn't work on constant combinators

Posted: Tue May 03, 2016 8:53 am
by Adil
Indeed there was an error in code.
And docs for 0.12.32 seem quite informative on the matter.
Excuse me for bothering.