Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
157 stars 51 forks source link

The switch triggers two signals when the state changes #79

Closed Bommik closed 3 years ago

Bommik commented 3 years ago

If the state of a switch is changed by hand, two signals are triggered. If I change the state of the switch with the computer, only one signal is triggered.

For reproduction you need:

How to reproduce the bug:

  1. run the code
  2. go to the modular panel and change the state of the switch
  3. print(x, event.pull()) is executed twice with each change

I used this code for testing:

panel = component.proxy("...")
switch = panel:getModules()[1]
event.ignoreAll()
event.listen(switch)
event.clear()
x=0
while true do
 x=x+1
 print(x,event.pull())
end