From 56ef90a0fb5798ebd97061e45761f6cdd4a3dcf7 Mon Sep 17 00:00:00 2001 From: Atlantiscze Date: Wed, 16 Jul 2014 14:52:48 +0200 Subject: [PATCH] Fix for issue which caused telecomms machinery to take no damage when temperature was 70C. Now it adds damage according to temperature. Higher temperature will cause the machinery to fail faster. --- code/game/machinery/telecomms/telecomunications.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 95995fa2b9..948d07b43b 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -215,10 +215,20 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list() // Checks heat from the environment and applies any integrity damage var/datum/gas_mixture/environment = loc.return_air() switch(environment.temperature) - if(T0C to (T20C + 20)) + if(0 to (T0C + 40)) // Absolute zero to 40�C, safe integrity = between(0, integrity, 100) - if((T20C + 20) to (T0C + 70)) + if((T0C + 40) to (T0C + 70)) // 40�C-70�C, minor overheat, 10% chance of taking damage + if (prob(10)) + integrity = max(0, integrity - 1) + if((T0C + 70) to (T0C + 130)) // 70�C-130�C, major overheat, 25% chance of taking damage + if (prob(25)) + integrity = max(0, integrity - 1) + if((T0C + 130) to (T0C + 200)) // 130�C-200�C, dangerous overheat, 50% chance of taking damage + if (prob(50)) + integrity = max(0, integrity - 1) + if((T0C + 200) to INFINITY) // More than 200�C, INFERNO. Takes damage every tick. integrity = max(0, integrity - 1) + if(delay) delay-- else