From 7a81058c5d3eb6c27d0301528b17a3736534bfce Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Wed, 20 Feb 2019 12:08:50 +0100 Subject: [PATCH 1/2] A modified cooling unit, it'S definitely safe I mean who would ever think to remove a cooling units safeties and tamper with the thermostat inside, dont be silly friend. It's simply **Advanced** that's why theres wires hanging from it! --- .../objects/items/devices/suit_cooling.dm | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 2040f22a99..8629cc1107 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -193,3 +193,47 @@ user << "The charge meter reads [round(cell.percent())]%." else user << "It doesn't have a power cell installed." + +//CHOMPEDIT hey you wanna go out into space here i got you a spacesuit, even got a cooling module :) trust me friend. +//Tampered Cooling unit, or also "Heating unit" +/obj/item/device/suit_cooling_unit/tampered + name = "modified portable suit cooling unit" + origin_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4) + max_cooling = 30 //doubled + thermostat = T200C //tenfold + desc = "A portable heat sink and liquid cooled radiator that can be hooked up to a space suit's existing temperature controls to provide industrial levels of cooling. This ones panel seems a bit loose and wires are hanging out." + +/obj/item/device/suit_cooling_unit/tampered/process() + if (!on || !cell) + return + + if (!ismob(loc)) + return + + if (!attached_to_suit(loc)) //make sure they have a suit and we are attached to it + return + + var/mob/living/carbon/human/H = loc + + var/efficiency = 1 - H.get_pressure_weakness() // You need to have a good seal for effective "cooling" + var/temp_adj = 0 // How much the unit heats you. Adjusted later on. + var/env_temp = get_environment_temperature() // This won't save you from a fire, yup + var/thermal_protection = H.get_heat_protection(env_temp) // ... unless you've got a good suit. not even then + + if(thermal_protection < 0.99) //For some reason, < 1 returns false if the value is 1. + temp_adj = min(H.bodytemperature - max(thermostat, env_temp), max_cooling) + else + temp_adj = min(H.bodytemperature - thermostat, max_cooling) + + //if (temp_adj < 0.5) //no safety + // return + + var/charge_usage = (temp_adj/max_cooling)*charge_consumption + + H.bodytemperature += temp_adj*efficiency //plus instead of minus + + cell.use(charge_usage) + + if(cell.charge <= 0) + turn_off(1) + From 339d0de126e91391a34de5c2cb5654906d0f6c50 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Wed, 20 Feb 2019 12:17:16 +0100 Subject: [PATCH 2/2] Update suit_cooling.dm --- code/game/objects/items/devices/suit_cooling.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 8629cc1107..aa9a00d191 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -200,7 +200,7 @@ name = "modified portable suit cooling unit" origin_tech = list(TECH_MAGNET = 4, TECH_MATERIAL = 4) max_cooling = 30 //doubled - thermostat = T200C //tenfold + thermostat = T20C*10 //tenfold desc = "A portable heat sink and liquid cooled radiator that can be hooked up to a space suit's existing temperature controls to provide industrial levels of cooling. This ones panel seems a bit loose and wires are hanging out." /obj/item/device/suit_cooling_unit/tampered/process()