mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
refactor: remove CanPass height arg (#26700)
This commit is contained in:
@@ -539,9 +539,9 @@
|
||||
/atom/movable/proc/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
return FALSE
|
||||
|
||||
/atom/movable/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
/atom/movable/CanPass(atom/movable/mover, turf/target)
|
||||
// This condition is copied from atom to avoid an extra parent call, because this is a very hot proc.
|
||||
if(!density || !height)
|
||||
if(!density)
|
||||
return TRUE
|
||||
return LAZYIN(buckled_mobs, mover)
|
||||
|
||||
|
||||
@@ -763,7 +763,7 @@
|
||||
/mob/living/simple_animal/demon/pulse_demon/ex_act()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/demon/pulse_demon/CanPass(atom/movable/mover, turf/target, height)
|
||||
/mob/living/simple_animal/demon/pulse_demon/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..()
|
||||
if(istype(mover, /obj/item/projectile/ion))
|
||||
return FALSE
|
||||
|
||||
@@ -37,9 +37,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'><b>Click-drag</b> someone to the table to place them on top of the table.</span>"
|
||||
|
||||
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
/obj/machinery/optable/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(isliving(mover))
|
||||
|
||||
@@ -760,7 +760,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
if(user)
|
||||
attack_ai(user)
|
||||
|
||||
/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && !locked)
|
||||
if(mover.checkpass(PASSDOOR))
|
||||
return TRUE
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
update_bounds()
|
||||
|
||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover))
|
||||
if(mover.checkpass(PASSDOOR) && !locked)
|
||||
return TRUE
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
|
||||
/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
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
return mob_dir & unres_sides
|
||||
|
||||
/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 TRUE
|
||||
if(isliving(mover))
|
||||
|
||||
@@ -27,11 +27,6 @@
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height)
|
||||
if(!height)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shield/CanAtmosPass(direction)
|
||||
return !density
|
||||
|
||||
@@ -547,10 +542,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return prob(20)
|
||||
else
|
||||
@@ -565,14 +557,14 @@
|
||||
desc = "A strange energy shield."
|
||||
icon_state = "shield-red"
|
||||
|
||||
/obj/machinery/shieldwall/syndicate/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/machinery/shieldwall/syndicate/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover))
|
||||
var/mob/living/M = mover
|
||||
if("syndicate" in M.faction)
|
||||
return TRUE
|
||||
if(isprojectile(mover))
|
||||
return FALSE
|
||||
return ..(mover, target, height)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shieldwall/syndicate/CanPathfindPass(to_dir, datum/can_pass_info/pass_info)
|
||||
if(pass_info.is_living && ("syndicate" in pass_info.factions))
|
||||
|
||||
@@ -125,9 +125,7 @@
|
||||
lifetime = 16 SECONDS_TO_LIFE_CYCLES
|
||||
causes_coughing = TRUE
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height = 0)
|
||||
if(!height)
|
||||
return TRUE
|
||||
/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)
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider) || isterrorspider(mover))
|
||||
return TRUE
|
||||
else if(isliving(mover))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target)
|
||||
var/can_hang = FALSE
|
||||
for(var/T in allowed)
|
||||
if(istype(mover,T))
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
dump_contents()
|
||||
return ..()
|
||||
|
||||
/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 TRUE
|
||||
return (!density)
|
||||
|
||||
|
||||
@@ -406,9 +406,7 @@
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(!height)
|
||||
return TRUE
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGIRDER))
|
||||
return TRUE
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
|
||||
@@ -113,10 +113,8 @@
|
||||
if(!shock(user, 70))
|
||||
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)
|
||||
. = !density
|
||||
if(height==0)
|
||||
return TRUE
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return TRUE
|
||||
if(isprojectile(mover))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
. = ..()
|
||||
T.recalculate_atmos_connectivity()
|
||||
|
||||
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target)
|
||||
return
|
||||
|
||||
/obj/structure/inflatable/CanAtmosPass(direction)
|
||||
@@ -116,7 +116,7 @@
|
||||
/obj/structure/inflatable/door/attack_hand(mob/user as mob)
|
||||
return try_to_operate(user)
|
||||
|
||||
/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(user.can_advanced_admin_interact())
|
||||
operate()
|
||||
|
||||
/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
|
||||
|
||||
@@ -294,9 +294,7 @@
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/m_tray/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
/obj/structure/m_tray/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover))
|
||||
if(mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
|
||||
@@ -126,9 +126,7 @@
|
||||
/obj/structure/table/proc/item_placed(item)
|
||||
return
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if(ismob(mover))
|
||||
@@ -901,9 +899,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>"
|
||||
|
||||
/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(!density) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
if(istype(mover))
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
/obj/structure/windoor_assembly/update_icon_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))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
|
||||
@@ -109,7 +109,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)
|
||||
|
||||
@@ -37,12 +37,6 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
|
||||
else
|
||||
icon_regular_floor = icon_state
|
||||
|
||||
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
// if((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
|
||||
// if(!( locate(/obj/machinery/mass_driver, src)))
|
||||
// return 0
|
||||
// return ..()
|
||||
|
||||
/turf/simulated/floor/ex_act(severity)
|
||||
if(is_shielded())
|
||||
return
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/blood_barrier/CanPass(atom/movable/mover, turf/target, height)
|
||||
/obj/structure/blood_barrier/CanPass(atom/movable/mover, turf/target)
|
||||
if(!isliving(mover))
|
||||
return FALSE
|
||||
var/mob/living/L = mover
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
/atom/movable/proc/CanAtmosPass()
|
||||
return TRUE
|
||||
|
||||
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
return (!density || !height)
|
||||
/atom/proc/CanPass(atom/movable/mover, turf/target)
|
||||
return !density
|
||||
|
||||
/turf/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
/turf/CanPass(atom/movable/mover, turf/target)
|
||||
if(!target) return 0
|
||||
|
||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||
@@ -32,10 +32,10 @@
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(!obstacle.CanPass(mover, target, height))
|
||||
if(!obstacle.CanPass(mover, target))
|
||||
return 0
|
||||
for(var/obj/obstacle in target)
|
||||
if(!obstacle.CanPass(mover, src, height))
|
||||
if(!obstacle.CanPass(mover, src))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
var/mob/living/carbon/human/oldguy
|
||||
var/is_zombie = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/structure/blob))
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
@@ -49,9 +49,8 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
|
||||
return 0
|
||||
/obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target)
|
||||
return istype(mover) && mover.checkpass(PASSBLOB)
|
||||
|
||||
/obj/structure/blob/shield/reflective
|
||||
name = "reflective blob"
|
||||
|
||||
@@ -49,9 +49,7 @@ GLOBAL_LIST_EMPTY(blob_minions)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height == 0)
|
||||
return TRUE
|
||||
/obj/structure/blob/CanPass(atom/movable/mover, turf/target)
|
||||
return istype(mover) && mover.checkpass(PASSBLOB)
|
||||
|
||||
/obj/structure/blob/CanAtmosPass(direction)
|
||||
|
||||
@@ -705,7 +705,7 @@
|
||||
if(!override)
|
||||
wither()
|
||||
|
||||
/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target)
|
||||
if(isvineimmune(mover))
|
||||
. = TRUE
|
||||
else
|
||||
|
||||
@@ -988,10 +988,7 @@
|
||||
update_state()
|
||||
|
||||
///Diona Nymph Related Procs///
|
||||
/obj/machinery/hydroponics/CanPass(atom/movable/mover, turf/target, height=0) //So nymphs can climb over top of trays.
|
||||
if(height==0)
|
||||
return 1
|
||||
|
||||
/obj/machinery/hydroponics/CanPass(atom/movable/mover, turf/target) //So nymphs can climb over top of trays.
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -167,7 +167,7 @@ GLOBAL_DATUM_INIT(ghost_crew_monitor, /datum/ui_module/crew_monitor/ghost, new)
|
||||
MA.plane = GAME_PLANE
|
||||
. = MA
|
||||
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/mob/dead/CanPass(atom/movable/mover, turf/target)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -237,12 +237,12 @@
|
||||
new /obj/effect/gibspawner/human(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover))
|
||||
var/mob/living/blocker = mover
|
||||
if(faction_check_mob(blocker))
|
||||
return 1
|
||||
return ..(mover, target, height)
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/officer
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
/mob/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/mob/CanPass(atom/movable/mover, turf/target)
|
||||
var/horizontal = FALSE
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
horizontal = IS_HORIZONTAL(L)
|
||||
|
||||
if(height==0)
|
||||
return 1
|
||||
if(isprojectile(mover))
|
||||
return projectile_hit_check(mover)
|
||||
if(mover.throwing)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
/obj/machinery/field
|
||||
var/hasShocked = 0 //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)
|
||||
return 0
|
||||
if(isliving(mover)) // Don't let mobs through
|
||||
|
||||
@@ -113,12 +113,6 @@
|
||||
#define COMPFRICTION 5e5
|
||||
#define COMPSTARTERLOAD 2800
|
||||
|
||||
|
||||
// Crucial to make things work!!!!
|
||||
// OLD FIX - explanation given down below.
|
||||
// /obj/machinery/power/compressor/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
// return !density
|
||||
|
||||
/obj/machinery/power/compressor/locate_machinery()
|
||||
if(turbine)
|
||||
return
|
||||
|
||||
@@ -610,7 +610,7 @@
|
||||
H.vent_gas(loc)
|
||||
qdel(H)
|
||||
|
||||
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target)
|
||||
if(isitem(mover) && mover.throwing)
|
||||
var/obj/item/I = mover
|
||||
if(isprojectile(I))
|
||||
@@ -634,7 +634,7 @@
|
||||
return
|
||||
|
||||
else
|
||||
return ..(mover, target, height)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/disposal/get_remote_view_fullscreens(mob/user)
|
||||
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
var/obj/target = A
|
||||
if(is_type_in_list(target, no_wrap))
|
||||
return
|
||||
|
||||
|
||||
if(istype(target, /obj/item/stack/packageWrap) && user.a_intent != INTENT_HARM)
|
||||
return
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
/obj/machinery/disposal/deliveryChute/update()
|
||||
return
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/CanPass(atom/movable/mover, turf/target, height)
|
||||
/obj/machinery/disposal/deliveryChute/CanPass(atom/movable/mover, turf/target)
|
||||
// If the mover is a thrownthing passing through space, remove its thrown datum,
|
||||
// ingest it like normal, and mark the chute as not passible.
|
||||
// This prevents the mover from Entering the chute's turf
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
return ..()
|
||||
|
||||
// So that beepsky can't push the janicart
|
||||
/obj/vehicle/CanPass(atom/movable/mover, turf/target, height)
|
||||
/obj/vehicle/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSMOB))
|
||||
return TRUE
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user