LuaCircuitNetwork.update() and LuaControlBehavior.update() to manually trigger the normal per-tick updates

Things that we aren't going to implement
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

LuaCircuitNetwork.update() and LuaControlBehavior.update() to manually trigger the normal per-tick updates

Post by sparr »

I would like to implement the behavior described in viewtopic.php?f=6&t=109643 as a mod. To do so, I need to be able to trigger updates of control behaviors and circuit networks. A method to update all circuit networks would work, but be wasteful compared to one to update just specific network(s). For control behaviors it would have to be selective. The selectivity could be an update method on individual LuaControlBehaviors and LuaCircuitNetworks, or it could be a LuaGameScript method with a filter parameter.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: LuaCircuitNetwork.update() and LuaControlBehavior.update() to manually trigger the normal per-tick updates

Post by boskid »

No. That was a nice theoretical discussion but its not something i would do for a released version of the game. I am not going to add this to 1.1 because that would be highly experimental feature. I am not going to add this to 2.0 because it would require a lot of fixes in various places. Those functions would break multiple assumptions we use in the circuit network for example a control behavior does a simplified check if inputs changed recently by checking circuit network if it reports as changed in the last tick but if control behavior update and circuit network update would be decoupled then some control behaviors could fail to notice inputs changed recently and would go into inconsistent state. I am not willing to sign for maintaining this function, i am just not seeing valid use cases for this, when you would write your mod and decide "it does not work for me, try something else" you could just start doing anything else but i would be forced to maintain this obscure API breaking a lot of our internal assumptions and breaking a lot of player's assumptions about how circuit network works. Just no.

Post Reply

Return to “Won't implement”