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:
Cadyn
2024-02-27 20:17:32 +01:00
committed by GitHub
co-authored by Selis Selis Kashargul SatinIsle Heroman Casey Raeschen
parent 96a43a09c1
commit b90f7ec922
254 changed files with 2135 additions and 1576 deletions
+8 -6
View File
@@ -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)