From b97a21ed94750b3479021963d5c69a5bf50ca082 Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Sun, 26 Jan 2014 16:39:20 -0800 Subject: [PATCH] Check for internals and accessibility on toxic farts. Conflicts: code/modules/mob/living/carbon/human/emote.dm --- code/modules/mob/living/carbon/human/emote.dm | 9 ++++++--- code/modules/virus2/helpers.dm | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index b7dcd6027ff..25ff0c67c8b 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -552,7 +552,7 @@ var/turf/location = get_turf(src) var/aoe_range=2 // Default if(M_SUPER_FART in mutations) - aoe_range+=5 + aoe_range+=3 //Was 5 // If we're wearing a suit, don't blast or gas those around us. var/wearing_suit=0 @@ -570,7 +570,12 @@ reagents.add_reagent("space_drugs", rand(10,20)) else // Was /turf/, now /mob/ + for(var/mob/M in range(location,aoe_range)) + if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS)) + continue + if(!airborne_can_reach(location,M,aoe_range)) + continue // Now, we don't have this: //new /obj/effects/fart_cloud(T,L) // But: @@ -580,8 +585,6 @@ // So, let's give 'em space drugs. if (M == src) continue - if(!airborne_can_reach(get_turf(src), get_turf(M))) - continue M.reagents.add_reagent("space_drugs",rand(1,10)) /* var/datum/effect/effect/system/smoke_spread/chem/fart/S = new /datum/effect/effect/system/smoke_spread/chem/fart diff --git a/code/modules/virus2/helpers.dm b/code/modules/virus2/helpers.dm index 2f157752811..ffd712bff98 100644 --- a/code/modules/virus2/helpers.dm +++ b/code/modules/virus2/helpers.dm @@ -37,12 +37,12 @@ proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne") return 1 //Checks if table-passing table can reach target (5 tile radius) -proc/airborne_can_reach(turf/source, turf/target) +proc/airborne_can_reach(turf/source, turf/target, var/radius=5) var/obj/dummy = new(source) dummy.flags = FPRINT | TABLEPASS dummy.pass_flags = PASSTABLE - for(var/i=0, i<5, i++) if(!step_towards(dummy, target)) break + for(var/i=0, i