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:
Emmett Gaines
2020-01-08 21:31:49 +01:00
committed by AnturK
parent 6fedf5dcfc
commit 53024590de
55 changed files with 217 additions and 231 deletions
+4 -4
View File
@@ -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)