Check for internals and accessibility on toxic farts.

Conflicts:
	code/modules/mob/living/carbon/human/emote.dm
This commit is contained in:
Rob Nelson
2014-01-28 23:38:31 -05:00
committed by ZomgPonies
parent 593cae8ca7
commit b97a21ed94
2 changed files with 8 additions and 5 deletions
@@ -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
+2 -2
View File
@@ -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<radius, i++) if(!step_towards(dummy, target)) break
var/rval = (dummy.loc in range(1,target))
dummy.loc = null