mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-23 17:30:30 +01:00
nuclear_reactor: do not set structure_accumulated_badness to less than 0
This commit is contained in:
parent
a84b5f3b28
commit
e056800cea
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user