mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Move recursive listening to component (#7894)
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user