From 88f3414d4c40668bf48bd470b91396a5a3cdefb1 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Sat, 16 Apr 2016 16:35:06 -0700 Subject: [PATCH] PoolOrNew is ugly, carbon trailing returns, oh my --- code/_onclick/hud/alert.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 1 - .../living/carbon/human/species/species.dm | 5 ++--- code/modules/mob/living/living.dm | 22 ++++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 8fec01be719..ca3f223c80d 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -33,7 +33,7 @@ else //no need to update return 0 else - alert = PoolOrNew(type) + alert = new type if(new_master) var/old_layer = new_master.layer diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index af76142de76..26def9b6520 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -777,7 +777,6 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, visible_message("[src] has successfully extinguished themselves!", \ "You extinguish yourself.") ExtinguishMob() - return /mob/living/carbon/resist_restraints() diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 3190195746d..28da2348c23 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -54,9 +54,9 @@ var/list/atmos_requirements = list( "min_oxy" = 16, - "max_oxy" = INFINITY, + "max_oxy" = 0, "min_nitro" = 0, - "max_nitro" = INFINITY, + "max_nitro" = 0, "min_tox" = 0, "max_tox" = 0.005, "min_co2" = 0, @@ -303,7 +303,6 @@ if(prob(20)) // Lets give them some chance to know somethings not right though I guess. spawn(0) H.emote("cough") - //throw_alert("co2", /obj/screen/alert/too_much_co2) //we're gonna leave this one as a silent killer for now else H.clear_alert("co2") if(atmos_requirements["min_co2"]) //species breathes this gas, so they got their air diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0a2e9fe5e5b..e29444641c4 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -556,18 +556,20 @@ for(var/X in grabbed_by) var/obj/item/weapon/grab/G = X resisting++ - if(G.state == GRAB_PASSIVE) - qdel(G) - else - if(G.state == GRAB_AGGRESSIVE) - if(prob(25)) + switch(G.state) + if(GRAB_PASSIVE) + qdel(G) + + if(GRAB_AGGRESSIVE) + if(prob(60)) visible_message("[src] has broken free of [G.assailant]'s grip!") qdel(G) - else - if(G.state == GRAB_NECK) - if(prob(5)) - visible_message("[src] has broken free of [G.assailant]'s headlock!") - qdel(G) + + if(GRAB_NECK) + if(prob(5)) + visible_message("[src] has broken free of [G.assailant]'s headlock!") + qdel(G) + if(resisting) visible_message("[src] resists!") return 1