How are circuit networks evaluated?

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
spacehitchhiker42
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Dec 04, 2023 8:27 pm
Contact:

How are circuit networks evaluated?

Post 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.

Post Reply

Return to “Modding discussion”