From 34618a6531d66b0ce6ce8eacf49c3cb99be1c2c6 Mon Sep 17 00:00:00 2001
From: Eiko <115115942+Pint-Sized-Pissraptor@users.noreply.github.com>
Date: Wed, 5 Oct 2022 17:09:40 -0400
Subject: [PATCH] Freezer/Heater Power Fix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
***HOPEFULLY*** fixes power draw from heaters/freezers reaching the megawatts range while using T4 parts. Hopefully. I don't really know what I'm doing 🐔
---
.../machinery/components/unary_devices/thermomachine.dm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
index 85f7f26cb..f45024148 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
@@ -65,7 +65,11 @@
. += "The status display reads: Efficiency [(heat_capacity/5000)*100]%."
. += "Temperature range [min_temperature]K - [max_temperature]K ([(T0C-min_temperature)*-1]C - [(T0C-max_temperature)*-1]C)."
+//I have never coded in byond before lmao but it somehow works
/obj/machinery/atmospherics/components/unary/thermomachine/process_atmos()
+ var/B
+ for(var/obj/item/stock_parts/matter_bin/M in component_parts)
+ B += M.rating
..()
if(!on || !nodes[1])
return
@@ -81,7 +85,7 @@
var/temperature_delta= abs(old_temperature - air_contents.temperature)
if(temperature_delta > 1)
- active_power_usage = (heat_capacity * temperature_delta) / 10 + idle_power_usage
+ active_power_usage = ((((heat_capacity * temperature_delta) * (2 * (10 ** 9))) ** 0.19) / 0.3) * (1 + (B / 2000)) + idle_power_usage
update_parents()
else
active_power_usage = idle_power_usage