Page 1 of 1

How are circuit networks evaluated?

Posted: Sat Jun 08, 2024 7:51 am
by spacehitchhiker42
I've got some ideas for an interface request for efficient circuit network modding, but before I post, I'd like some more info on how circuit networks actually work behind the scene. I've got a pretty good guess, but correct me if I'm wrong.

1.Whenever a device changes its output, mark the network on that output as changed signals.

2. On tick, for each dirty network, add together all the outputs on that network to get the current signal. Mark all inputs on network as having a changed signal. Clear network changed status.

3. For each device with changed inputs, run control behavior, set outputs, mark network as having changed signals, goto 2.