mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 08:39:12 +01:00
The 515 MegaPR early downport (#7783)
Co-authored-by: Selis <selis@xynolabs.com> Co-authored-by: Selis <sirlionfur@hotmail.de> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: SatinIsle <thesatinisle@gmail.com> Co-authored-by: Heroman <alesha3000@list.ru> Co-authored-by: Casey <a.roaming.shadow@gmail.com> Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
co-authored by
Selis
Selis
Kashargul
SatinIsle
Heroman
Casey
Raeschen
parent
96a43a09c1
commit
b90f7ec922
@@ -8,9 +8,10 @@
|
||||
// /atom/old_loc: The loc before the move.
|
||||
// /atom/new_loc: The loc after the move.
|
||||
|
||||
|
||||
/*
|
||||
GLOBAL_DATUM_INIT(moved_event, /decl/observ/moved, new)
|
||||
|
||||
|
||||
/decl/observ/moved
|
||||
name = "Moved"
|
||||
expected_type = /atom/movable
|
||||
@@ -21,28 +22,29 @@ GLOBAL_DATUM_INIT(moved_event, /decl/observ/moved, new)
|
||||
// Listen to the parent if possible.
|
||||
if(. && istype(mover.loc, expected_type))
|
||||
register(mover.loc, mover, /atom/movable/proc/recursive_move)
|
||||
*/
|
||||
//Deprecated in favor of comsigs
|
||||
|
||||
/********************
|
||||
* Movement Handling *
|
||||
********************/
|
||||
/atom/movable/Entered(var/atom/movable/am, atom/old_loc)
|
||||
. = ..()
|
||||
if(GLOB.moved_event.has_listeners(am))
|
||||
GLOB.moved_event.register(src, am, /atom/movable/proc/recursive_move)
|
||||
am.RegisterSignal(src,COMSIG_OBSERVER_MOVED, /atom/movable/proc/recursive_move, override = TRUE)
|
||||
|
||||
/atom/movable/Exited(var/atom/movable/am, atom/old_loc)
|
||||
. = ..()
|
||||
GLOB.moved_event.unregister(src, am, /atom/movable/proc/recursive_move)
|
||||
am.UnregisterSignal(src,COMSIG_OBSERVER_MOVED)
|
||||
|
||||
// Entered() typically lifts the moved event, but in the case of null-space we'll have to handle it.
|
||||
/atom/movable/Move()
|
||||
var/old_loc = loc
|
||||
. = ..()
|
||||
if(. && !loc)
|
||||
GLOB.moved_event.raise_event(src, old_loc, null)
|
||||
SEND_SIGNAL(src,COMSIG_OBSERVER_MOVED, old_loc, null)
|
||||
|
||||
/atom/movable/forceMove(atom/destination)
|
||||
var/old_loc = loc
|
||||
. = ..()
|
||||
if(. && !loc)
|
||||
GLOB.moved_event.raise_event(src, old_loc, null)
|
||||
SEND_SIGNAL(src,COMSIG_OBSERVER_MOVED, old_loc, null)
|
||||
|
||||
Reference in New Issue
Block a user