From 11ba197b300dab338beaaf37a9dde39726183037 Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Wed, 3 Sep 2014 18:58:11 +0100 Subject: [PATCH] fix for contaminants not processing if air is OK otherwise also a small fix for VV Signed-off-by: Mloc-Argent --- code/modules/admin/verbs/modifyvariables.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index e5b1555b0d9..b89b4a67eb5 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -215,7 +215,7 @@ var/list/forbidden_varedit_object_types = list( var/list/choices = list("text","num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default") if(src.holder && src.holder.marked_datum) choices += "marked datum ([holder.marked_datum.type])" - if(!isnull(default) && default != "num" && !isnull(L[variable])) + if(!isnull(default) && default != "num") choices += "edit associated variable" choices += "DELETE FROM LIST" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index de8cc2c01e6..f7dc3a30ff3 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -498,12 +498,12 @@ if(inhale_pp < safe_pressure_min) if(prob(20)) spawn(0) emote("gasp") - + var/ratio = inhale_pp/safe_pressure_min // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!) adjustOxyLoss(max(HUMAN_MAX_OXYLOSS*(1-ratio), 0)) failed_inhale = 1 - + oxygen_alert = max(oxygen_alert, 1) else // We're in safe limits @@ -629,8 +629,8 @@ if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX //world << "Breath: [breath.temperature], [src]: [bodytemperature], Adjusting: [temp_adj]" bodytemperature += temp_adj - - + + breath.update_values() return 1 @@ -642,6 +642,12 @@ var/pressure = environment.return_pressure() var/adjusted_pressure = calculate_affecting_pressure(pressure) + //Check for contaminants before anything else because we don't want to skip it. + for(var/g in environment.gas) + if(gas_data.flags[g] & XGM_GAS_CONTAMINANT && environment.gas[g] > gas_data.overlay_limit[g] + 1) + pl_effects() + break + if(!istype(get_turf(src), /turf/space)) //space is not meant to change your body temperature. var/loc_temp = T0C if(istype(loc, /obj/mecha)) @@ -728,10 +734,6 @@ else pressure_alert = -1 - for(var/g in environment.gas) - if(gas_data.flags[g] & XGM_GAS_CONTAMINANT && environment.gas[g] > gas_data.overlay_limit[g] + 1) - pl_effects() - break return /*