Removes old height parameter from CanPass proc (#29218)

This commit is contained in:
AnturK
2017-07-13 13:57:25 +02:00
committed by KorPhaeron
parent 7a26305498
commit d3bcb4cbf9
46 changed files with 57 additions and 101 deletions

View File

@@ -102,15 +102,14 @@
/atom/proc/handle_ricochet(obj/item/projectile/P) /atom/proc/handle_ricochet(obj/item/projectile/P)
return return
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5) /atom/proc/CanPass(atom/movable/mover, turf/target)
return (!density || !height) return !density
/atom/proc/onCentcom() /atom/proc/onCentcom()
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!T) if(!T)
return FALSE return FALSE
if(T.z == ZLEVEL_TRANSIT) if(T.z == ZLEVEL_TRANSIT)
for(var/A in SSshuttle.mobile) for(var/A in SSshuttle.mobile)
var/obj/docking_port/mobile/M = A var/obj/docking_port/mobile/M = A

View File

@@ -406,7 +406,7 @@
return 0 return 0
return 1 return 1
/atom/movable/CanPass(atom/movable/mover, turf/target, height=1.5) /atom/movable/CanPass(atom/movable/mover, turf/target)
if(mover in buckled_mobs) if(mover in buckled_mobs)
return 1 return 1
return ..() return ..()

View File

@@ -46,7 +46,7 @@
else else
adjustFireLoss(5) adjustFireLoss(5)
/mob/living/simple_animal/hostile/blob/CanPass(atom/movable/mover, turf/target, height = 0) /mob/living/simple_animal/hostile/blob/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /obj/structure/blob)) if(istype(mover, /obj/structure/blob))
return 1 return 1
return ..() return ..()

View File

@@ -73,9 +73,7 @@
/obj/structure/blob/BlockSuperconductivity() /obj/structure/blob/BlockSuperconductivity()
return atmosblock return atmosblock
/obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/blob/CanPass(atom/movable/mover, turf/target)
if(height==0)
return 1
if(istype(mover) && mover.checkpass(PASSBLOB)) if(istype(mover) && mover.checkpass(PASSBLOB))
return 1 return 1
return 0 return 0
@@ -179,11 +177,11 @@
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it
ConsumeTile() //hit the tile we're in, making sure there are no border objects blocking us ConsumeTile() //hit the tile we're in, making sure there are no border objects blocking us
if(!T.CanPass(src, T, 5)) //is the target turf impassable if(!T.CanPass(src, T)) //is the target turf impassable
make_blob = FALSE make_blob = FALSE
T.blob_act(src) //hit the turf if it is T.blob_act(src) //hit the turf if it is
for(var/atom/A in T) for(var/atom/A in T)
if(!A.CanPass(src, T, 5)) //is anything in the turf impassable if(!A.CanPass(src, T)) //is anything in the turf impassable
make_blob = FALSE make_blob = FALSE
A.blob_act(src) //also hit everything in the turf A.blob_act(src) //also hit everything in the turf

View File

@@ -36,7 +36,7 @@
/obj/structure/destructible/clockwork/taunting_trail/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) /obj/structure/destructible/clockwork/taunting_trail/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
playsound(src, 'sound/items/welder.ogg', 50, 1) playsound(src, 'sound/items/welder.ogg', 50, 1)
/obj/structure/destructible/clockwork/taunting_trail/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/destructible/clockwork/taunting_trail/CanPass(atom/movable/mover, turf/target)
return TRUE return TRUE
/obj/structure/destructible/clockwork/taunting_trail/Crossed(atom/movable/AM) /obj/structure/destructible/clockwork/taunting_trail/Crossed(atom/movable/AM)

View File

@@ -279,7 +279,7 @@
to_chat(src, "<span class='revenwarning'>You cannot use abilities from inside of a wall.</span>") to_chat(src, "<span class='revenwarning'>You cannot use abilities from inside of a wall.</span>")
return FALSE return FALSE
for(var/obj/O in T) for(var/obj/O in T)
if(O.density && !O.CanPass(src, T, 5)) if(O.density && !O.CanPass(src, T))
to_chat(src, "<span class='revenwarning'>You cannot use abilities inside of a dense object.</span>") to_chat(src, "<span class='revenwarning'>You cannot use abilities inside of a dense object.</span>")
return FALSE return FALSE
if(inhibited) if(inhibited)

View File

@@ -37,9 +37,7 @@
else else
return ..() return ..()
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff. /obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
if(height==0)
return 1
if(locate(/obj/structure/barricade) in get_turf(mover)) if(locate(/obj/structure/barricade) in get_turf(mover))
return 1 return 1
else if(istype(mover, /obj/item/projectile)) else if(istype(mover, /obj/item/projectile))

View File

@@ -98,7 +98,7 @@
..() ..()
move_update_air(T) move_update_air(T)
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/door/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity return !opacity
return !density return !density

View File

@@ -212,7 +212,7 @@
flags = ON_BORDER flags = ON_BORDER
CanAtmosPass = ATMOS_PASS_PROC CanAtmosPass = ATMOS_PASS_PROC
/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border if(get_dir(loc, target) == dir) //Make sure looking at appropriate border

View File

@@ -89,7 +89,7 @@
do_animate("deny") do_animate("deny")
return return
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/door/window/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border if(get_dir(loc, target) == dir) //Make sure looking at appropriate border

View File

@@ -25,12 +25,6 @@
..() ..()
move_update_air(T) move_update_air(T)
/obj/structure/emergency_shield/CanPass(atom/movable/mover, turf/target, height)
if(!height)
return FALSE
else
return ..()
/obj/structure/emergency_shield/emp_act(severity) /obj/structure/emergency_shield/emp_act(severity)
switch(severity) switch(severity)
if(1) if(1)
@@ -440,10 +434,7 @@
if(gen_secondary) //using power may cause us to be destroyed if(gen_secondary) //using power may cause us to be destroyed
gen_secondary.use_stored_power(drain_amount*0.5) gen_secondary.use_stored_power(drain_amount*0.5)
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
if(height==0)
return FALSE
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return prob(20) return prob(20)
else else

View File

@@ -62,7 +62,7 @@
AM.loc = src.loc AM.loc = src.loc
do_transform(AM) do_transform(AM)
/obj/machinery/transformer/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/transformer/CanPass(atom/movable/mover, turf/target)
// Allows items to go through, // Allows items to go through,
// to stop them from blocking the conveyor belt. // to stop them from blocking the conveyor belt.
if(!ishuman(mover)) if(!ishuman(mover))

View File

@@ -231,7 +231,7 @@
to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>") to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>")
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5) /obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target)
return !density return !density
/obj/structure/foamedmetal/iron /obj/structure/foamedmetal/iron
@@ -273,7 +273,7 @@
for(var/obj/item/Item in O) for(var/obj/item/Item in O)
Item.extinguish() Item.extinguish()
/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target, height) /obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return TRUE return TRUE
. = ..() . = ..()

View File

@@ -133,8 +133,7 @@
M.emote("cough") M.emote("cough")
return 1 return 1
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height=0) /obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target)
if(height==0) return 1
if(istype(mover, /obj/item/projectile/beam)) if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover var/obj/item/projectile/beam/B = mover
B.damage = (B.damage/2) B.damage = (B.damage/2)

View File

@@ -35,8 +35,7 @@
icon_state = "stickyweb2" icon_state = "stickyweb2"
. = ..() . = ..()
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
if(height==0) return 1
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider)) if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
return 1 return 1
else if(isliving(mover)) else if(isliving(mover))

View File

@@ -92,7 +92,7 @@
generator = null generator = null
return ..() return ..()
/obj/structure/projected_forcefield/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/projected_forcefield/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
return !density return !density

View File

@@ -98,7 +98,7 @@
return attack_hand(user) return attack_hand(user)
/obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/alien/resin/CanPass(atom/movable/mover, turf/target)
return !density return !density

View File

@@ -81,8 +81,8 @@
else if(secure && !opened) else if(secure && !opened)
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>") to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(height == 0 || wall_mounted) if(wall_mounted)
return 1 return 1
return !density return !density

View File

@@ -19,7 +19,7 @@
..() ..()
update_icon() update_icon()
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target)
if(!istype(mover, /obj/structure/closet)) if(!istype(mover, /obj/structure/closet))
var/obj/structure/closet/crate/locatedcrate = locate(/obj/structure/closet/crate) in get_turf(mover) var/obj/structure/closet/crate/locatedcrate = locate(/obj/structure/closet/crate) in get_turf(mover)
if(locatedcrate) //you can walk on it like tables, if you're not in an open crate trying to move to a closed crate if(locatedcrate) //you can walk on it like tables, if you're not in an open crate trying to move to a closed crate

View File

@@ -265,9 +265,7 @@
else else
return ..() return ..()
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/girder/CanPass(atom/movable/mover, turf/target)
if(height==0)
return 1
if(istype(mover) && mover.checkpass(PASSGRILLE)) if(istype(mover) && mover.checkpass(PASSGRILLE))
return prob(girderpasschance) return prob(girderpasschance)
else else

View File

@@ -89,8 +89,7 @@
take_damage(20, BRUTE, "melee", 1) take_damage(20, BRUTE, "melee", 1)
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/grille/CanPass(atom/movable/mover, turf/target)
if(height==0) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE)) if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1 return 1
else else

View File

@@ -48,11 +48,9 @@
max_integrity = 20 max_integrity = 20
var/allow_walk = 1 //can we pass through it on walk intent var/allow_walk = 1 //can we pass through it on walk intent
/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) /obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target)
if(!density) if(!density)
return 1 return 1
if(air_group || (height==0))
return 1
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE)) if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
return 1 return 1
if(iscarbon(mover)) if(iscarbon(mover))

View File

@@ -55,7 +55,7 @@
/obj/structure/mineral_door/attack_hand(mob/user) /obj/structure/mineral_door/attack_hand(mob/user)
return TryToSwitchState(user) return TryToSwitchState(user)
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /obj/effect/beam)) if(istype(mover, /obj/effect/beam))
return !opacity return !opacity
return !density return !density

View File

@@ -306,10 +306,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
desc = "Apply corpse before closing." desc = "Apply corpse before closing."
icon_state = "morguet" icon_state = "morguet"
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target)
if(height == 0)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE)) if(istype(mover) && mover.checkpass(PASSTABLE))
return 1 return 1
if(locate(/obj/structure/table) in get_turf(mover)) if(locate(/obj/structure/table) in get_turf(mover))

View File

@@ -69,9 +69,7 @@
else else
..() ..()
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/table/CanPass(atom/movable/mover, turf/target)
if(height==0)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE)) if(istype(mover) && mover.checkpass(PASSTABLE))
return 1 return 1
if(mover.throwing) if(mover.throwing)
@@ -407,8 +405,7 @@
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density. pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
max_integrity = 20 max_integrity = 20
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/rack/CanPass(atom/movable/mover, turf/target)
if(height==0) return 1
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!| if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
return 1 return 1
if(istype(mover) && mover.checkpass(PASSTABLE)) if(istype(mover) && mover.checkpass(PASSTABLE))

View File

@@ -53,7 +53,7 @@
/obj/structure/windoor_assembly/update_icon() /obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]" icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border if(get_dir(loc, target) == dir) //Make sure looking at appropriate border

View File

@@ -114,7 +114,7 @@
else else
..(FULLTILE_WINDOW_DIR) ..(FULLTILE_WINDOW_DIR)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/window/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
if(dir == FULLTILE_WINDOW_DIR) if(dir == FULLTILE_WINDOW_DIR)

View File

@@ -189,11 +189,9 @@
/turf/open/chasm/CanPass(atom/movable/mover, turf/target, height=0) /turf/open/chasm/CanPass(atom/movable/mover, turf/target)
return 1 return 1
//Jungle //Jungle
/turf/open/chasm/jungle /turf/open/chasm/jungle

View File

@@ -96,24 +96,14 @@
return FALSE return FALSE
/turf/CanPass(atom/movable/mover, turf/target, height=1.5) /turf/CanPass(atom/movable/mover, turf/target)
if(!target) return FALSE if(!target) return FALSE
if(istype(mover)) // turf/Enter(...) will perform more advanced checks if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density return !density
else // Now, doing more detailed checks for air movement and air group formation stack_trace("Non movable passed to turf CanPass : [mover]")
if(target.blocks_air||blocks_air) return FALSE
return FALSE
for(var/obj/obstacle in src)
if(!obstacle.CanPass(mover, target, height))
return FALSE
for(var/obj/obstacle in target)
if(!obstacle.CanPass(mover, src, height))
return FALSE
return TRUE
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) /turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
if (!mover) if (!mover)
@@ -127,6 +117,7 @@
return FALSE return FALSE
var/list/large_dense = list() var/list/large_dense = list()
//Next, check objects to block entry that are on the border //Next, check objects to block entry that are on the border
for(var/atom/movable/border_obstacle in src) for(var/atom/movable/border_obstacle in src)
if(border_obstacle.flags & ON_BORDER) if(border_obstacle.flags & ON_BORDER)

View File

@@ -579,7 +579,7 @@
if(!override) if(!override)
qdel(src) qdel(src)
/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/spacevine/CanPass(atom/movable/mover, turf/target)
if(isvineimmune(mover)) if(isvineimmune(mover))
. = TRUE . = TRUE
else else

View File

@@ -23,7 +23,7 @@
name = "energy field" name = "energy field"
desc = "Get off my turf!" desc = "Get off my turf!"
/obj/effect/abstract/proximity_checker/advanced/field_turf/CanPass(atom/movable/AM, turf/target, height) /obj/effect/abstract/proximity_checker/advanced/field_turf/CanPass(atom/movable/AM, turf/target)
if(parent) if(parent)
return parent.field_turf_canpass(AM, src, target) return parent.field_turf_canpass(AM, src, target)
return TRUE return TRUE
@@ -47,7 +47,7 @@
name = "energy field edge" name = "energy field edge"
desc = "Edgy description here." desc = "Edgy description here."
/obj/effect/abstract/proximity_checker/advanced/field_edge/CanPass(atom/movable/AM, turf/target, height) /obj/effect/abstract/proximity_checker/advanced/field_edge/CanPass(atom/movable/AM, turf/target)
if(parent) if(parent)
return parent.field_edge_canpass(AM, src, target) return parent.field_edge_canpass(AM, src, target)
return TRUE return TRUE

View File

@@ -171,7 +171,7 @@
/mob/living/simple_animal/shade/howling_ghost/adjustHealth() /mob/living/simple_animal/shade/howling_ghost/adjustHealth()
. = 0 . = 0
/mob/living/simple_animal/shade/howling_ghost/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) /mob/living/simple_animal/shade/howling_ghost/CanPass(atom/movable/mover, turf/target)
return 1 return 1

View File

@@ -118,7 +118,7 @@
else else
..() ..()
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/holohoop/CanPass(atom/movable/mover, turf/target)
if (isitem(mover) && mover.throwing) if (isitem(mover) && mover.throwing)
var/obj/item/I = mover var/obj/item/I = mover
if(istype(I, /obj/item/projectile)) if(istype(I, /obj/item/projectile))

View File

@@ -151,7 +151,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
updateallghostimages() updateallghostimages()
return ..() return ..()
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0) /mob/dead/CanPass(atom/movable/mover, turf/target)
return 1 return 1
/* /*

View File

@@ -397,7 +397,7 @@ Difficulty: Hard
faction = list("mining", "boss") faction = list("mining", "boss")
weather_immunities = list("lava","ash") weather_immunities = list("lava","ash")
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/slaughter/CanPass(atom/movable/mover, turf/target, height = 0) /mob/living/simple_animal/hostile/asteroid/hivelordbrood/slaughter/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum)) if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum))
return 1 return 1
return 0 return 0

View File

@@ -467,7 +467,7 @@ Difficulty: Hard
queue_smooth_neighbors(src) queue_smooth_neighbors(src)
return ..() return ..()
/obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, turf/target, height = 0) /obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, turf/target)
if(QDELETED(caster)) if(QDELETED(caster))
return FALSE return FALSE
if(mover == caster.pulledby) if(mover == caster.pulledby)

View File

@@ -70,7 +70,7 @@
return return
//if it's not our target, we ignore it //if it's not our target, we ignore it
/mob/living/simple_animal/hostile/asteroid/curseblob/CanPass(atom/movable/mover, turf/target, height = 0) /mob/living/simple_animal/hostile/asteroid/curseblob/CanPass(atom/movable/mover, turf/target)
if(mover == set_target) if(mover == set_target)
return FALSE return FALSE
if(istype(mover, /obj/item/projectile)) if(istype(mover, /obj/item/projectile))

View File

@@ -1,6 +1,4 @@
/mob/CanPass(atom/movable/mover, turf/target, height=0) /mob/CanPass(atom/movable/mover, turf/target)
if(height==0)
return TRUE
if(istype(mover, /obj/item/projectile) || mover.throwing) if(istype(mover, /obj/item/projectile) || mover.throwing)
return (!density || lying) return (!density || lying)
if(mover.checkpass(PASSMOB)) if(mover.checkpass(PASSMOB))

View File

@@ -72,9 +72,7 @@
return ..() return ..()
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target)
if(height==0)
return 1
return 0 return 0

View File

@@ -86,7 +86,7 @@
/obj/machinery/field /obj/machinery/field
var/hasShocked = FALSE //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second. var/hasShocked = FALSE //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
/obj/machinery/field/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/field/CanPass(atom/movable/mover, turf/target)
if(hasShocked) if(hasShocked)
return FALSE return FALSE
if(isliving(mover)) // Don't let mobs through if(isliving(mover)) // Don't let mobs through

View File

@@ -98,7 +98,7 @@
// Crucial to make things work!!!! // Crucial to make things work!!!!
// OLD FIX - explanation given down below. // OLD FIX - explanation given down below.
// /obj/machinery/power/compressor/CanPass(atom/movable/mover, turf/target, height=0) // /obj/machinery/power/compressor/CanPass(atom/movable/mover, turf/target)
// return !density // return !density
/obj/machinery/power/compressor/locate_machinery() /obj/machinery/power/compressor/locate_machinery()

View File

@@ -332,7 +332,7 @@
eject() eject()
. = TRUE . = TRUE
/obj/machinery/disposal/bin/CanPass(atom/movable/mover, turf/target, height=0) /obj/machinery/disposal/bin/CanPass(atom/movable/mover, turf/target)
if (isitem(mover) && mover.throwing) if (isitem(mover) && mover.throwing)
var/obj/item/I = mover var/obj/item/I = mover
if(istype(I, /obj/item/projectile)) if(istype(I, /obj/item/projectile))
@@ -345,7 +345,7 @@
visible_message("<span class='notice'>[I] bounces off of [src]'s rim!</span>") visible_message("<span class='notice'>[I] bounces off of [src]'s rim!</span>")
return 0 return 0
else else
return ..(mover, target, height) return ..(mover, target)
/obj/machinery/disposal/bin/flush() /obj/machinery/disposal/bin/flush()
..() ..()

View File

@@ -56,7 +56,7 @@
/obj/structure/necropolis_gate/singularity_pull() /obj/structure/necropolis_gate/singularity_pull()
return 0 return 0
/obj/structure/necropolis_gate/CanPass(atom/movable/mover, turf/target, height=0) /obj/structure/necropolis_gate/CanPass(atom/movable/mover, turf/target)
if(get_dir(loc, target) == dir) if(get_dir(loc, target) == dir)
return !density return !density
return 1 return 1

View File

@@ -76,9 +76,7 @@
icon = 'icons/mob/blob.dmi' icon = 'icons/mob/blob.dmi'
color = rgb(145, 150, 0) color = rgb(145, 150, 0)
/obj/effect/gluttony/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff. /obj/effect/gluttony/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
if(height==0)
return 1
if(ishuman(mover)) if(ishuman(mover))
var/mob/living/carbon/human/H = mover var/mob/living/carbon/human/H = mover
if(H.nutrition >= NUTRITION_LEVEL_FAT) if(H.nutrition >= NUTRITION_LEVEL_FAT)

View File

@@ -216,7 +216,7 @@
var/threshold = 500 var/threshold = 500
var/static/list/approved_passengers = list() var/static/list/approved_passengers = list()
/obj/effect/forcefield/luxury_shuttle/CanPass(atom/movable/mover, turf/target, height=0) /obj/effect/forcefield/luxury_shuttle/CanPass(atom/movable/mover, turf/target)
if(mover in approved_passengers) if(mover in approved_passengers)
return 1 return 1

View File

@@ -31,7 +31,7 @@
wizard = summoner wizard = summoner
QDEL_IN(src, 300) QDEL_IN(src, 300)
/obj/effect/forcefield/wizard/CanPass(atom/movable/mover, turf/target, height=0) /obj/effect/forcefield/wizard/CanPass(atom/movable/mover, turf/target)
if(mover == wizard) if(mover == wizard)
return 1 return 1
return 0 return 0