[0.12.32] set_circuit_condition doesn't work on constant combinators

Bugs that are actually features.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

[0.12.32] set_circuit_condition doesn't work on constant combinators

Post 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
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

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

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15901
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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}}})
If you want to get ahold of me I'm almost always on Discord.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

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

Post 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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Post Reply

Return to “Not a bug”