Removes old height parameter from CanPass proc

This commit is contained in:
CitadelStationBot
2017-07-13 17:46:36 -05:00
parent da324257fe
commit 1da785ffb5
46 changed files with 57 additions and 101 deletions
+2 -3
View File
@@ -102,15 +102,14 @@
/atom/proc/handle_ricochet(obj/item/projectile/P)
return
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5)
return (!density || !height)
/atom/proc/CanPass(atom/movable/mover, turf/target)
return !density
/atom/proc/onCentcom()
var/turf/T = get_turf(src)
if(!T)
return FALSE
if(T.z == ZLEVEL_TRANSIT)
for(var/A in SSshuttle.mobile)
var/obj/docking_port/mobile/M = A
+1 -1
View File
@@ -406,7 +406,7 @@
return 0
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)
return 1
return ..()
+1 -1
View File
@@ -46,7 +46,7 @@
else
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))
return 1
return ..()
+3 -5
View File
@@ -73,9 +73,7 @@
/obj/structure/blob/BlockSuperconductivity()
return atmosblock
/obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
/obj/structure/blob/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSBLOB))
return 1
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
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
T.blob_act(src) //hit the turf if it is
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
A.blob_act(src) //also hit everything in the turf
@@ -36,7 +36,7 @@
/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)
/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
/obj/structure/destructible/clockwork/taunting_trail/Crossed(atom/movable/AM)
@@ -279,7 +279,7 @@
to_chat(src, "<span class='revenwarning'>You cannot use abilities from inside of a wall.</span>")
return FALSE
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>")
return FALSE
if(inhibited)
+1 -3
View File
@@ -37,9 +37,7 @@
else
return ..()
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff.
if(height==0)
return 1
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
if(locate(/obj/structure/barricade) in get_turf(mover))
return 1
else if(istype(mover, /obj/item/projectile))
+1 -1
View File
@@ -98,7 +98,7 @@
..()
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))
return !opacity
return !density
+1 -1
View File
@@ -212,7 +212,7 @@
flags = ON_BORDER
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))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+1 -1
View File
@@ -89,7 +89,7 @@
do_animate("deny")
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))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+1 -10
View File
@@ -25,12 +25,6 @@
..()
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)
switch(severity)
if(1)
@@ -440,10 +434,7 @@
if(gen_secondary) //using power may cause us to be destroyed
gen_secondary.use_stored_power(drain_amount*0.5)
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return FALSE
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return prob(20)
else
+1 -1
View File
@@ -62,7 +62,7 @@
AM.loc = src.loc
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,
// to stop them from blocking the conveyor belt.
if(!ishuman(mover))
@@ -231,7 +231,7 @@
to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>")
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
/obj/structure/foamedmetal/iron
@@ -273,7 +273,7 @@
for(var/obj/item/Item in O)
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))
return TRUE
. = ..()
@@ -133,8 +133,7 @@
M.emote("cough")
return 1
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover
B.damage = (B.damage/2)
+1 -2
View File
@@ -35,8 +35,7 @@
icon_state = "stickyweb2"
. = ..()
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
return 1
else if(isliving(mover))
@@ -92,7 +92,7 @@
generator = null
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))
return 1
return !density
+1 -1
View File
@@ -98,7 +98,7 @@
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
@@ -81,8 +81,8 @@
else if(secure && !opened)
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"].</span>")
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
if(height == 0 || wall_mounted)
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
if(wall_mounted)
return 1
return !density
@@ -19,7 +19,7 @@
..()
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))
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
+1 -3
View File
@@ -265,9 +265,7 @@
else
return ..()
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
/obj/structure/girder/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGRILLE))
return prob(girderpasschance)
else
+1 -2
View File
@@ -89,8 +89,7 @@
take_damage(20, BRUTE, "melee", 1)
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
/obj/structure/grille/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
else
+1 -3
View File
@@ -48,11 +48,9 @@
max_integrity = 20
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)
return 1
if(air_group || (height==0))
return 1
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
return 1
if(iscarbon(mover))
@@ -55,7 +55,7 @@
/obj/structure/mineral_door/attack_hand(mob/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))
return !opacity
return !density
+1 -4
View File
@@ -306,10 +306,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
desc = "Apply corpse before closing."
icon_state = "morguet"
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target, height=0)
if(height == 0)
return 1
/obj/structure/tray/m_tray/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(locate(/obj/structure/table) in get_turf(mover))
+2 -5
View File
@@ -69,9 +69,7 @@
else
..()
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(mover.throwing)
@@ -407,8 +405,7 @@
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
max_integrity = 20
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
@@ -53,7 +53,7 @@
/obj/structure/windoor_assembly/update_icon()
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))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+1 -1
View File
@@ -114,7 +114,7 @@
else
..(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))
return 1
if(dir == FULLTILE_WINDOW_DIR)
+1 -3
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
//Jungle
/turf/open/chasm/jungle
+4 -13
View File
@@ -96,24 +96,14 @@
return FALSE
/turf/CanPass(atom/movable/mover, turf/target, height=1.5)
/turf/CanPass(atom/movable/mover, turf/target)
if(!target) return FALSE
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density
else // Now, doing more detailed checks for air movement and air group formation
if(target.blocks_air||blocks_air)
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
stack_trace("Non movable passed to turf CanPass : [mover]")
return FALSE
/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area)
if (!mover)
@@ -127,6 +117,7 @@
return FALSE
var/list/large_dense = list()
//Next, check objects to block entry that are on the border
for(var/atom/movable/border_obstacle in src)
if(border_obstacle.flags & ON_BORDER)