summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2017-09-07 07:43:20 +0200
committerNathanaƫl Courant <Ekdohibs@users.noreply.github.com>2017-09-07 07:43:20 +0200
commite056800cea806be2a16476e338d8f8df9d8520ba (patch)
tree9f571a4dd1020217ae018daa5d7b7cdd95e47514
parenta84b5f3b28789318738dfa52ee1264c8d31eecb4 (diff)
nuclear_reactor: do not set structure_accumulated_badness to less than 0
-rw-r--r--technic/machines/HV/nuclear_reactor.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua
index 3377710..231b6b3 100644
--- a/technic/machines/HV/nuclear_reactor.lua
+++ b/technic/machines/HV/nuclear_reactor.lua
@@ -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