mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-16 02:17:06 +01:00
TGUI Hotfixes, Oh God Am I The TGUI Guy Now Edition (#22648)
changes: - bugfix: "Restores the Modular Computer access cable header button for connecting to IPCs and machinery." - bugfix: "Fixes display issues in the Robotics interface's <collapsible> elements." - bugfix: "Fixes in-chat feedback text provided by the Cyborg Analyzer (organ name and status now both inline)." - bugfix: "Crew Manifest PDA app now filters out off-ship personnel." - bugfix: "Fixes Autolathe TGUI appending search- and category- filtered recipes instead of recomputing the list with those filters." - bugfix: "Fixes runtime when ghost opens dedicated camera console UI." - code_imp: "Update some defs referencing 'supply' department to 'operations'." - refactor: "Standardizes all interface search bars to use the native 'SearchBar' component." - refactor: "AtmosAlarmControl interface now correctly auto-sorts alarms by alert status."
This commit is contained in:
@@ -13,6 +13,20 @@
|
||||
/// The diagnostics module associated with this program.
|
||||
var/datum/tgui_module/ipc_diagnostic/diagnostic
|
||||
|
||||
/datum/computer_file/program/robotics/proc/get_connected_ipc()
|
||||
if(!computer.access_cable_dongle?.access_cable)
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/machine/access_port/port = computer.access_cable_dongle.access_cable.target
|
||||
if(!istype(port))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/ipc = port.owner
|
||||
if(!isipc(ipc))
|
||||
return
|
||||
|
||||
return ipc
|
||||
|
||||
/datum/computer_file/program/robotics/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
|
||||
. = ..()
|
||||
if(!ishuman(ui.user))
|
||||
@@ -20,35 +34,28 @@
|
||||
|
||||
var/mob/living/carbon/human/user = ui.user
|
||||
if(action == "run_diagnostics")
|
||||
if(computer.access_cable_dongle && computer.access_cable_dongle.access_cable)
|
||||
var/mob/living/carbon/human/synthetic = computer.access_cable_dongle.access_cable.target
|
||||
if(istype(user) && istype(synthetic))
|
||||
ui.user.visible_message(SPAN_NOTICE("[user] begins running a diagnostic scan..."))
|
||||
if(do_after(user, 3 SECONDS))
|
||||
diagnostic = new(user, synthetic)
|
||||
return TRUE
|
||||
var/mob/living/carbon/human/synthetic = get_connected_ipc()
|
||||
if(istype(synthetic))
|
||||
ui.user.visible_message(SPAN_NOTICE("[user] begins running a diagnostic scan..."))
|
||||
if(do_after(user, 3 SECONDS))
|
||||
diagnostic = new(user, synthetic)
|
||||
return TRUE
|
||||
|
||||
if(action == "open_diagnostic")
|
||||
if(computer.access_cable_dongle && computer.access_cable_dongle.access_cable)
|
||||
var/mob/living/carbon/human/synthetic = get_connected_ipc()
|
||||
if(istype(diagnostic))
|
||||
if(diagnostic.patient != synthetic)
|
||||
to_chat(user, SPAN_WARNING("This diagnostic is no longer valid and has been deleted."))
|
||||
QDEL_NULL(diagnostic)
|
||||
return TRUE
|
||||
|
||||
if(istype(diagnostic))
|
||||
if(diagnostic.patient != computer.access_cable_dongle.access_cable.target)
|
||||
to_chat(user, SPAN_WARNING("This diagnostic is no longer valid and has been deleted."))
|
||||
qdel(diagnostic)
|
||||
return TRUE
|
||||
|
||||
var/mob/living/carbon/human/synthetic = computer.access_cable_dongle.access_cable.target
|
||||
if(istype(user) && istype(synthetic))
|
||||
diagnostic.ui_interact(user)
|
||||
return TRUE
|
||||
if(istype(synthetic))
|
||||
diagnostic.ui_interact(user)
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/robotics/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/mob/living/carbon/human/ipc
|
||||
if(computer.access_cable_dongle && computer.access_cable_dongle.access_cable)
|
||||
var/obj/item/organ/internal/machine/access_port/port = computer.access_cable_dongle.access_cable.target
|
||||
if(istype(port))
|
||||
ipc = port.owner
|
||||
var/mob/living/carbon/human/ipc = get_connected_ipc()
|
||||
|
||||
if(isipc(ipc))
|
||||
var/datum/species/machine/machine_species = ipc.species // need to manually set to ipc species because of machine_ui_theme
|
||||
|
||||
@@ -92,11 +92,18 @@
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
var/obj/item/card/id/I = user.GetIdCard()
|
||||
var/I = user.GetIdCard()
|
||||
if(!I)
|
||||
return 0
|
||||
|
||||
if(access in I.access)
|
||||
var/list/access_list
|
||||
if(islist(I))
|
||||
access_list = I
|
||||
else if(istype(I, /obj/item))
|
||||
var/obj/item/item = I
|
||||
access_list = item.GetAccess()
|
||||
|
||||
if(access in access_list)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user