Temperature gun update

This commit is contained in:
Markolie
2015-09-13 21:05:23 +02:00
parent d6ccb3f189
commit aaeac981b9
12 changed files with 230 additions and 77 deletions
+11 -11
View File
@@ -141,26 +141,26 @@
loc_temp = loc:air_contents.temperature
else
loc_temp = environment.temperature
if(loc_temp < 310.15) // a cold place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
else // a hot place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
//Account for massive pressure differences
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
if(bodytemperature <= (T0C - 40)) // stun temperature
Tempstun = 1
if(bodytemperature <= (T0C - 50)) // hurt temperature
if(bodytemperature <= 50) // sqrting negative numbers is bad
adjustToxLoss(200)
else
adjustToxLoss(301) //The config.health_threshold_dead is -100 by default, and slimes have 150hp (200hp for adults),
else //so the ToxLoss needs to be 300 or above to guarrantee an instant death
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
else
Tempstun = 0
/*moved after the temperature damage code so freeze beams can instantly kill slimes -Deity Link*/
if(loc_temp < 310.15) // a cold place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
else // a hot place
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
updatehealth()
@@ -215,7 +215,7 @@
if(src.stat != DEAD)
src.stat = UNCONSCIOUS
if(prob(30))
if(prob(30)) //I think this is meant to allow slimes to starve to death
adjustOxyLoss(-1)
adjustToxLoss(-1)
adjustFireLoss(-1)