technic nuclear_reactor: do not set structure_accumulated_badness to less than 0

master
vlapsley 2017-09-15 16:09:41 +10:00
parent de99bffce7
commit 3dbc444fe9
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ minetest.register_abm({
local accum_badness = meta:get_int("structure_accumulated_badness")
if badness == 0 then
if accum_badness ~= 0 then
meta:set_int("structure_accumulated_badness", accum_badness - 4)
meta:set_int("structure_accumulated_badness", math.max(accum_badness - 4, 0))
siren_clear(pos, meta)
end
else