From 1accee1c36c4d48210c71ca07b5cbddfa21aef9e Mon Sep 17 00:00:00 2001 From: phil235 Date: Mon, 22 Jun 2015 16:10:24 +0200 Subject: [PATCH] Fixes singularity not applying its tox damage to mobs. Adjusted its radiation and toxdamage values. Fixes simple animals that needs to breath not taking damage from lack of gas to breath on space turfs. Fixes revenant not being spaceworthy. Fixes simple_animal accumulating radiation indefinitely because they are unaffected by it. --- code/modules/mob/living/life.dm | 1 + .../mob/living/simple_animal/revenant/revenant.dm | 1 + code/modules/mob/living/simple_animal/simple_animal.dm | 4 ++++ code/modules/power/singularity/singularity.dm | 10 +++++----- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 5beeeb3a847..151b8978dc8 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -62,6 +62,7 @@ return /mob/living/proc/handle_mutations_and_radiation() + radiation = 0 //so radiation don't accumulate in simple animals return /mob/living/proc/handle_chemicals_in_body() diff --git a/code/modules/mob/living/simple_animal/revenant/revenant.dm b/code/modules/mob/living/simple_animal/revenant/revenant.dm index c81bb72ee31..dc1137e62d5 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant.dm @@ -18,6 +18,7 @@ response_help = "passes through" response_disarm = "swings at" response_harm = "punches" + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 0 maxbodytemp = INFINITY harm_intent_damage = 5 diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index f7f81ef7c41..6d3ff27d7a9 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -201,6 +201,10 @@ if(!atmos_suitable) adjustBruteLoss(unsuitable_atmos_damage) + else + if(atmos_requirements["min_oxy"] || atmos_requirements["min_tox"] || atmos_requirements["min_n2"] || atmos_requirements["min_co2"]) + adjustBruteLoss(unsuitable_atmos_damage) + handle_temperature_damage() /mob/living/simple_animal/proc/handle_temperature_damage() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 9a30df83891..bab46250bde 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -361,14 +361,14 @@ var/toxdamage = 4 var/radiation = 15 var/radiationmin = 3 - if (src.energy>200) - toxdamage = round(((src.energy-150)/50)*4,1) - radiation = round(((src.energy-150)/50)*5,1) - radiationmin = round((radiation/5),1)// + if (energy>200) + toxdamage += round((energy-150)/30,1) + radiation += round((energy-150)/10,1) + radiationmin = round((radiation/5),1) for(var/mob/living/M in view(toxrange, src.loc)) M.irradiate(rand(radiationmin,radiation)) toxdamage = (toxdamage - (toxdamage*M.getarmor(null, "rad"))) - M.apply_effect(toxdamage, TOX) + M.apply_damage(toxdamage, TOX) return