Could we introduce new things to PTR next time? the new cooldown broke my chemestry setup (easy fix, but annoying)
Artem from Screeps
How did it break your code? This is not a breaking change of any kind. You can call `runReaction` every tick as before and everything will run as usual.
Well not exactly break, but I stored the exact amount of reactions it needed in memory, with the cooldown it tried to perform the reaction anyway, I did not check if the result was OK.
The counter of the amount of reactions to run got diminished anyway, but the supplier labs were not empty yet when my code thought it was finished reacting.
Later when the chemist-creep started filling it up, it still had some minerals inside the supplier labs, causing an error for when transferring.
You should not rely on scheduling commands this way. Even when you get OK code it doesn't mean that the scheduled action will take place due to parallel actions processing architecture.
Nice changes, I like them.
Could we introduce new things to PTR next time? the new cooldown broke my chemestry setup (easy fix, but annoying)
How did it break your code? This is not a breaking change of any kind. You can call `runReaction` every tick as before and everything will run as usual.
Well not exactly break, but I stored the exact amount of reactions it needed in memory, with the cooldown it tried to perform the reaction anyway, I did not check if the result was OK.
The counter of the amount of reactions to run got diminished anyway, but the supplier labs were not empty yet when my code thought it was finished reacting.
Later when the chemist-creep started filling it up, it still had some minerals inside the supplier labs, causing an error for when transferring.
Code in question:
Fix was:
You should not rely on scheduling commands this way. Even when you get OK code it doesn't mean that the scheduled action will take place due to parallel actions processing architecture.
It was still experimental code to get a feeling for the chemistry, I'm now checking if the supplier labs are empty