mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Can pass refactor (#48659)
* Makes all CanPass procs call parent * Makes CanPass more extendable and gives the mover a say in the matter * Replace CanPass with CanAllowThrough to use the new system Regex replace `(?<!proc)/CanPass\(` => `/CanAllowThrough(` * Simple optimization pass
This commit is contained in:
@@ -23,10 +23,10 @@
|
||||
name = "energy field"
|
||||
desc = "Get off my turf!"
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_turf/CanPass(atom/movable/AM, turf/target)
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_turf/CanAllowThrough(atom/movable/AM, turf/target)
|
||||
. = ..()
|
||||
if(parent)
|
||||
return parent.field_turf_canpass(AM, src, target)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_turf/Crossed(atom/movable/AM)
|
||||
if(parent)
|
||||
@@ -47,10 +47,10 @@
|
||||
name = "energy field edge"
|
||||
desc = "Edgy description here."
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_edge/CanPass(atom/movable/AM, turf/target)
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_edge/CanAllowThrough(atom/movable/AM, turf/target)
|
||||
. = ..()
|
||||
if(parent)
|
||||
return parent.field_edge_canpass(AM, src, target)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_edge/Crossed(atom/movable/AM)
|
||||
if(parent)
|
||||
|
||||
Reference in New Issue
Block a user