From 0020ce8faab27f8ad5fb3756cafe3970722da525 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Mon, 4 Mar 2019 12:05:56 +0100 Subject: [PATCH] Biochemical cooling swap --- .../objects/items/devices/suit_cooling.dm | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index ffa8898d23..a61c5fcdd0 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -240,17 +240,27 @@ /mob/living/simple_animal/hostile/jelly/cold //you are my test mob now fug you name = "Frostbite Jelly" //might make a blue icon someday, not priority this is debug stuff - var/cooling = 5 //variable cooling + var/cooling = -5 //variable cooling var/isCooling = 1 -/mob/living/simple_animal/hostile/jelly/cold/proc/toggle_cooling() +/mob/living/simple_animal/hostile/jelly/cold/proc/toggle_cooling() isCooling=!isCooling +/mob/living/simple_animal/hostile/jelly/cold/handle_cooling(var/datum/gas_mixture/environment) + var/datum/gas_mixture/gas + gas = environment.remove(0.25 * environment.total_moles) + if(gas) + gas.add_thermal_energy(cooling) + environment.merge(gas) + /mob/living/simple_animal/hostile/jelly/cold/Life() ..() + var/datum/gas_mixture/environment = src.loc.return_air() if(icon_state != icon_dead && isCooling) + handle_cooling(environment) src.bodytemperature -= cooling - - - - + if(src.bodytemperature<=-500) + iscooling = 0 + if(src.bodytemperature>=-499) + iscooling = 1 +