Ship Sensor View Fix (#18030)

* Ship Sensor View Fix

* copy paste error

* Update code/modules/mob/living/carbon/human/life.dm

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* dmdoc'd

---------

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
This commit is contained in:
Geeves
2023-12-31 20:06:23 +02:00
committed by GitHub
parent e1a6de3369
commit 91a45a4e39
7 changed files with 25 additions and 14 deletions
@@ -116,6 +116,7 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Helm", capitalize_first_letters(name))
RegisterSignal(ui, COMSIG_TGUI_CLOSE, PROC_REF(handle_unlook_signal))
ui.open()
/obj/machinery/computer/ship/helm/ui_data(mob/user)
@@ -84,6 +84,7 @@
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Sensors", capitalize_first_letters(name))
RegisterSignal(ui, COMSIG_TGUI_CLOSE, PROC_REF(handle_unlook_signal))
ui.open()
/obj/machinery/computer/ship/sensors/ui_data(mob/user)
@@ -60,6 +60,12 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
LAZYDISTINCTADD(linked.navigation_viewers, WEAKREF(user))
ADD_TRAIT(user, TRAIT_COMPUTER_VIEW, ref(src))
/// Handles disabling the user's overmap view when a signal comes in, primarily used when the TGUI is closed, see helm.dm and sensors.dm
/obj/machinery/computer/ship/proc/handle_unlook_signal(var/datum/source, var/mob/user)
SIGNAL_HANDLER
unlook(user)
/obj/machinery/computer/ship/proc/unlook(var/mob/user)
user.reset_view()
var/client/c = user.client