mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
refactor: remove CanPass height arg (#26700)
This commit is contained in:
committed by
GitHub
parent
9f8c2c219c
commit
9a5db8f91e
@@ -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