Title: [1.3.2] Crash: "Bonus progress can't be negative" (rocket-crafting.lua:123)
Happens occasionally on a rocket silo with productivity modules. Base game, no Space Age.
Error while running event Verbose-Engineering::on_tick (ID 0)
Bonus progress can't be negative.
stack traceback:
[C]: in function 'newindex'
__Verbose-Engineering/scripts/rocket-crafting.lua:123
The on_tick handler reads silo.bonus_progress at line 121 and writes it back at line 123.
Sometimes the value read is slightly negative (the game lets you read a negative bonus
progress, but not write one), so writing it back crashes. The code never clamps it to 0.
Suggested fix at line 123:
silo_data.silo.bonus_progress = math.max(0, silo_data.bonus_progress)
Thanks for the mod!