Error in speaker get_circuit_network? [solved]
Posted: Thu Jan 01, 2026 7:38 pm
I am currently rewriting Alertlist2 for 2.0
I found a problem that I can not fix at the moment, so I ask anyone of you if this is on my part or on the part of the api.
Setup:
I have a speaker. Connected to it are a green wire and a red wire. Both are on the other side connected to the same belt with "Read belt contents -> Hold(all belts). In the speaker UI I have the item on the belt in the left part of the "Circuit connections settings".
The number there is double the number of the items on the belt (as it should be).
In my mod I get the curcuit network via
speaker.get_control_behavior().get_circuit_network(defines.wire_type.red)
There I get only one of the signals (so the number is exactly that of the items on the belt) as is should be.
BUT
speaker.get_control_behavior().get_circuit_network(defines.wire_type.green)
returns no entries.
Also if I disconnect the red wire I still get an entry via
speaker.get_control_behavior().get_circuit_network(defines.wire_type.red)
TL;DR:
Its seems to me that
speaker.get_control_behavior().get_circuit_network(defines.wire_type.green)
is not working and
speaker.get_control_behavior().get_circuit_network(defines.wire_type.red)
is not returning the expected items.
Any thoughts on this?
I found a problem that I can not fix at the moment, so I ask anyone of you if this is on my part or on the part of the api.
Setup:
I have a speaker. Connected to it are a green wire and a red wire. Both are on the other side connected to the same belt with "Read belt contents -> Hold(all belts). In the speaker UI I have the item on the belt in the left part of the "Circuit connections settings".
The number there is double the number of the items on the belt (as it should be).
In my mod I get the curcuit network via
speaker.get_control_behavior().get_circuit_network(defines.wire_type.red)
There I get only one of the signals (so the number is exactly that of the items on the belt) as is should be.
BUT
speaker.get_control_behavior().get_circuit_network(defines.wire_type.green)
returns no entries.
Also if I disconnect the red wire I still get an entry via
speaker.get_control_behavior().get_circuit_network(defines.wire_type.red)
TL;DR:
Its seems to me that
speaker.get_control_behavior().get_circuit_network(defines.wire_type.green)
is not working and
speaker.get_control_behavior().get_circuit_network(defines.wire_type.red)
is not returning the expected items.
Any thoughts on this?