mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Partially ports the GLOB system
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
// /old_dir: The dir before the change.
|
||||
// /new_dir: The dir after the change.
|
||||
|
||||
var/decl/observ/dir_set/dir_set_event = new()
|
||||
GLOBAL_DATUM_INIT(dir_set_event, /decl/observ/dir_set, new)
|
||||
|
||||
/decl/observ/dir_set
|
||||
name = "Direction Set"
|
||||
@@ -27,9 +27,9 @@ var/decl/observ/dir_set/dir_set_event = new()
|
||||
|
||||
/atom/movable/Entered(var/atom/movable/am, atom/old_loc)
|
||||
. = ..()
|
||||
if(. != CANCEL_MOVE_EVENT && dir_set_event.has_listeners(am))
|
||||
dir_set_event.register(src, am, /atom/proc/recursive_dir_set)
|
||||
if(. != CANCEL_MOVE_EVENT && GLOB.dir_set_event.has_listeners(am))
|
||||
GLOB.dir_set_event.register(src, am, /atom/proc/recursive_dir_set)
|
||||
|
||||
/atom/movable/Exited(var/atom/movable/am, atom/old_loc)
|
||||
. = ..()
|
||||
dir_set_event.unregister(src, am, /atom/proc/recursive_dir_set)
|
||||
GLOB.dir_set_event.unregister(src, am, /atom/proc/recursive_dir_set)
|
||||
|
||||
Reference in New Issue
Block a user