Move recursive listening to component (#7894)

Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
Cadyn
2024-03-08 04:49:31 -08:00
committed by GitHub
parent f590dbea21
commit 0fdd1ffc83
22 changed files with 162 additions and 12 deletions

View File

@@ -65,6 +65,7 @@
owner = H
if(owner)
owner.AddComponent(/datum/component/recursive_move)
RegisterSignal(owner, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen))
check_whitelist = check_species_whitelist
whitelist = species_whitelist

View File

@@ -144,6 +144,7 @@
if(active_camera)
UnregisterSignal(active_camera, COMSIG_OBSERVER_MOVED)
active_camera = C
active_camera.AddComponent(/datum/component/recursive_move)
RegisterSignal(active_camera, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen))
playsound(tgui_host(), get_sfx("terminal_type"), 25, FALSE)
update_active_camera_screen()
@@ -171,6 +172,7 @@
if(active_camera)
UnregisterSignal(active_camera, COMSIG_OBSERVER_MOVED)
active_camera = target
active_camera.AddComponent(/datum/component/recursive_move)
RegisterSignal(active_camera, COMSIG_OBSERVER_MOVED, PROC_REF(update_active_camera_screen))
playsound(tgui_host(), get_sfx("terminal_type"), 25, FALSE)
update_active_camera_screen()

View File

@@ -55,6 +55,7 @@
user.set_machine(src)
user.reset_view(linked)
user.set_viewsize(world.view + extra_view)
user.AddComponent(/datum/component/recursive_move)
RegisterSignal(user, COMSIG_OBSERVER_MOVED, /datum/tgui_module/ship/proc/unlook)
LAZYDISTINCTADD(viewers, WEAKREF(user))