When cloning some entities the new copies appears to ignore any conditions for their first tick. Primarily an issue for mods, but the underlying issue is entirely reproduced in vanilla 1.0 with the editor.
I've tested belts and inserters, and interestingly pumps don't appear to be affected. I haven't tested it on any other entity types yet.
Before cloning:
After cloning:
Before cloning:
After cloning:
Cloned entities ignore conditions for their first tick
Re: Cloned entities ignore conditions for their first tick
That's working correctly. The circuit network has no values the first tick because the live state of the network is not cloned: just the entities are.
If you want to get ahold of me I'm almost always on Discord.
Re: Cloned entities ignore conditions for their first tick
Just to clarify in case it helps modders attempt a workaround, when you say "has no values" do you mean null or undefined rather than just zero'd out? As the intended before and after state in the demo setup is that the network has no signals with the entities configured to be inactive in any feasibly reachable state.
Re: Cloned entities ignore conditions for their first tick
I mean it's a completely new circuit network and has no live values. Everything sends their state during the creation tick and then the next tick it gets swapped into the live values and the system repeats itself. It's now circuit networks work.Atraxi wrote: ↑Fri Sep 04, 2020 4:04 pm Just to clarify in case it helps modders attempt a workaround, when you say "has no values" do you mean null or undefined rather than just zero'd out? As the intended before and after state in the demo setup is that the network has no signals with the entities configured to be inactive in any feasibly reachable state.
If you want to get ahold of me I'm almost always on Discord.
Re: Cloned entities ignore conditions for their first tick
If the network had no values then the "value < 0" filters would keep things disabled, but the demonstrations here are of "value < 0" filters being true and/or ignored for the first tick. This seems to be something more than just the values not being present.
Re: Cloned entities ignore conditions for their first tick
The belt is active for the first tick and updates independent from the control behavior. In the same way if you create-entity a belt and in the same tick create the control behavior and set the condition it still updates once before the control behavior disables it.
If you want to get ahold of me I'm almost always on Discord.
Re: Cloned entities ignore conditions for their first tick
OK. Thanks for clarifying that. It still feels like a misbehavior, but at least knowing what's causing it behind the scenes makes it more predictable. Is there any way to explicitly and unconditionally prevent such an entity from operating on tick one from within the mod that creates it, to give the conditions time to take effect?