From 73997d7bd483c6b2f571f67410eb0284f957a71e Mon Sep 17 00:00:00 2001 From: MisterBook Date: Mon, 29 Apr 2013 22:35:58 -0500 Subject: [PATCH] Fixes Godmode for humans so that it truly is godmode. Good for bug checking. Atmos temperature difference will no longer directly apply fireloss, nor will being punched or shot in the guts damage organs. Can no longer be shocked. --- code/modules/mob/living/carbon/carbon.dm | 1 + code/modules/mob/living/carbon/human/life.dm | 9 +++++++-- code/modules/mob/living/living.dm | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 7eca9638fc5..809225d596e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -97,6 +97,7 @@ return /mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0) + if(status_flags & GODMODE) return 0 //godmode shock_damage *= siemens_coeff if (shock_damage<1) return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index fe981f489a1..369919f5e37 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -450,6 +450,7 @@ SA.moles = 0 if( (abs(310.15 - breath.temperature) > 50) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :( + if(status_flags & GODMODE) return 1 //godmode if(breath.temperature < 260.15) if(prob(20)) src << "\red You feel your face freezing and an icicle forming in your lungs!" @@ -518,6 +519,7 @@ if(bodytemperature > BODYTEMP_HEAT_DAMAGE_LIMIT) //Body temperature is too hot. fire_alert = max(fire_alert, 1) + if(status_flags & GODMODE) return 1 //godmode switch(bodytemperature) if(360 to 400) apply_damage(HEAT_DAMAGE_LEVEL_1, BURN, used_weapon = "High Body Temperature") @@ -531,6 +533,7 @@ else if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT) fire_alert = max(fire_alert, 1) + if(status_flags & GODMODE) return 1 //godmode if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) switch(bodytemperature) if(200 to 260) @@ -548,6 +551,7 @@ var/pressure = environment.return_pressure() var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob. + if(status_flags & GODMODE) return 1 //godmode switch(adjusted_pressure) if(HAZARD_HIGH_PRESSURE to INFINITY) adjustBruteLoss( min( ( (adjusted_pressure / HAZARD_HIGH_PRESSURE) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) ) @@ -784,7 +788,7 @@ for(var/obj/item/I in src) if(I.contaminated) total_plasmaloss += vsc.plc.CONTAMINATION_LOSS - + if(status_flags & GODMODE) return 0 //godmode adjustToxLoss(total_plasmaloss) // if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist @@ -1270,6 +1274,7 @@ playsound_local(src,pick(scarySounds),50, 1, -1) proc/handle_virus_updates() + if(status_flags & GODMODE) return 0 //godmode if(bodytemperature > 406) for(var/datum/disease/D in viruses) D.cure() @@ -1319,7 +1324,7 @@ handle_shock() ..() - + if(status_flags & GODMODE) return 0 //godmode if(analgesic) return // analgesic avoids all traumatic shock temporarily if(health < 0)// health 0 makes you immediately collapse diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c7aab1d9ed9..162a69b49c7 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -228,6 +228,7 @@ // damage ONE external organ, organ gets randomly selected from damaged ones. /mob/living/proc/take_organ_damage(var/brute, var/burn) + if(status_flags & GODMODE) return 0 //godmode adjustBruteLoss(brute) adjustFireLoss(burn) src.updatehealth() @@ -240,6 +241,7 @@ // damage MANY external organs, in random order /mob/living/proc/take_overall_damage(var/brute, var/burn, var/used_weapon = null) + if(status_flags & GODMODE) return 0 //godmode adjustBruteLoss(brute) adjustFireLoss(burn) src.updatehealth()