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.

This commit is contained in:
Atlantiscze
2014-07-16 14:52:48 +02:00
parent 547679aff9
commit 56ef90a0fb
@@ -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 40C, safe
integrity = between(0, integrity, 100)
if((T20C + 20) to (T0C + 70))
if((T0C + 40) to (T0C + 70)) // 40C-70C, minor overheat, 10% chance of taking damage
if (prob(10))
integrity = max(0, integrity - 1)
if((T0C + 70) to (T0C + 130)) // 70C-130C, major overheat, 25% chance of taking damage
if (prob(25))
integrity = max(0, integrity - 1)
if((T0C + 130) to (T0C + 200)) // 130C-200C, dangerous overheat, 50% chance of taking damage
if (prob(50))
integrity = max(0, integrity - 1)
if((T0C + 200) to INFINITY) // More than 200C, INFERNO. Takes damage every tick.
integrity = max(0, integrity - 1)
if(delay)
delay--
else