mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user