Verbose Engineering

by FoxSylv

Decompile resources into their letters, and rebuild everything from those letters.

Overhaul
6 days ago
2.0
1.20K
Manufacturing

b Crash: "Bonus progress can't be negative"

a month ago

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!

6 days ago

Oh now that's an interesting edge case; thanks for bringing it to my attention! This problem should be fixed in version 1.3.3 ^w^

6 days ago

Thanks, I hosted a 1 week Multi-team public run recently with Verbose Engineering, everyone loved it. Great mod.

New response