Efficient circuit network processing
Posted: Wed Jun 19, 2024 12:05 am
TL;DR
A special type of circuit network entity with behavior to allow the mod to take part in circuit network processing.What ?
The entity, Modded_Circuit_Point, would connect similarly to an Inserter, being able to take input and send output from the same connection. During Circuit Network processing, the game calls a function , Process_Modded_Circuits(), with a list of any Modded_Circuit_Point entities where the input signal has changed.Each mod only processes the modded_circuit_points that it creates. The code inside Process_Modded_Circuits() would then be able to set Modded_Circuit_Point output signals or store data in global for use in on_tick() or other events.
I don't think that this would affect validation as long as nothing that changes the game state (other than setting Modded_Circuit_Point outputs) is done from Process_Modded_circuits(). If the mod did need to do anything that would require validation, it could just leave some data in global to be processed later.