From 2e7859c35e55b842752c6533edae2dd19290fabc Mon Sep 17 00:00:00 2001
From: Tanmaya Meher <tanmayameher@users.noreply.github.com>
Date: Sat, 25 Aug 2018 12:24:14 +0200
Subject: [PATCH] New MV Hydro Machine (#412)

---
 technic/machines/HV/nuclear_reactor.lua |    2 +-
 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 @@
 		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

--
Gitblit v1.8.0