From a5b36b041e01346807e477e905717dfd25928bbc Mon Sep 17 00:00:00 2001 From: auouymous <5005204+auouymous@users.noreply.github.com> Date: Sat, 12 Sep 2020 10:27:31 +0200 Subject: [PATCH] Prevent protection check on MV machine close (#569) --- technic/machines/HV/nuclear_reactor.lua | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua index 3377710..c6ed4df 100644 --- a/technic/machines/HV/nuclear_reactor.lua +++ b/technic/machines/HV/nuclear_reactor.lua @@ -257,7 +257,7 @@ 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 @@ -455,7 +455,7 @@ technic_run = run, technic_on_disable = function(pos, node) local timer = minetest.get_node_timer(pos) - timer:start(1) + timer:start(1) end, on_timer = function(pos, node) local meta = minetest.get_meta(pos) -- Gitblit v1.8.0