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:
Batrachophreno
2026-06-08 10:45:31 +00:00
committed by GitHub
parent 987a08bf87
commit 1b05577bdf
42 changed files with 494 additions and 423 deletions
@@ -1,6 +1,6 @@
/obj/item/robot_module/aicontrol
name = "ai controlled robot module"
channels = list(CHANNEL_COMMAND = TRUE, CHANNEL_SCIENCE = TRUE, CHANNEL_MEDICAL = TRUE, CHANNEL_ENGINEERING = TRUE, CHANNEL_SECURITY = TRUE, CHANNEL_SUPPLY = TRUE, CHANNEL_SERVICE = TRUE, CHANNEL_AI_PRIVATE = TRUE, CHANNEL_HAILING = TRUE)
channels = list(CHANNEL_COMMAND = TRUE, CHANNEL_SCIENCE = TRUE, CHANNEL_MEDICAL = TRUE, CHANNEL_ENGINEERING = TRUE, CHANNEL_SECURITY = TRUE, CHANNEL_OPERATIONS = TRUE, CHANNEL_SERVICE = TRUE, CHANNEL_AI_PRIVATE = TRUE, CHANNEL_HAILING = TRUE)
networks = list(NETWORK_COMMAND)
languages = list(
LANGUAGE_SOL_COMMON = TRUE,
@@ -102,17 +102,16 @@
continue
organ_found = TRUE
var/found_damage = FALSE
to_chat(user, SPAN_NOTICE(SPAN_BOLD("[O.name]")))
if(O.damage)
to_chat(user, SPAN_WARNING("Core damage detected."))
found_damage = TRUE
if(istype(O, /obj/item/organ/internal/machine))
var/obj/item/organ/internal/machine/machine_organ = O
if(machine_organ.get_integrity() < 100)
to_chat(user, SPAN_WARNING("<b>[machine_organ.name]</b>: Integrity damage detected."))
to_chat(user, "<font color='#FFA500'><b>[machine_organ.name]:</b> Integrity damage detected.</font>")
found_damage = TRUE
else if(O.damage)
to_chat(user, SPAN_WARNING("<b>[O.name]:</b> Core damage detected."))
found_damage = TRUE
if(!found_damage)
to_chat(user, SPAN_NOTICE("No damage detected."))
to_chat(user, SPAN_GOOD("<b>[O.name]:</b> No damage detected."))
if(!organ_found)
to_chat(user, SPAN_NOTICE("No prosthetics located."))
@@ -701,7 +701,7 @@ GLOBAL_LIST_INIT(robot_modules, list(
/obj/item/robot_module/service/clerical
name = "clerical robot module"
channels = list(CHANNEL_SUPPLY = TRUE, CHANNEL_COMMAND = TRUE)
channels = list(CHANNEL_OPERATIONS = TRUE, CHANNEL_COMMAND = TRUE)
networks = list(NETWORK_MINE)
specialized_access_types = list(/datum/job/janitor) // Janitor is a nice general access without specifics
@@ -727,7 +727,7 @@ GLOBAL_LIST_INIT(robot_modules, list(
/obj/item/robot_module/miner
name = "miner robot module"
channels = list(CHANNEL_SUPPLY = TRUE, CHANNEL_HAILING = TRUE)
channels = list(CHANNEL_OPERATIONS = TRUE, CHANNEL_HAILING = TRUE)
networks = list(NETWORK_MINE)
sprites = list(
"Basic" = list(ROBOT_CHASSIS = "robot_mine", ROBOT_PANEL = "robot", ROBOT_EYES = "robot"),
@@ -794,7 +794,7 @@ GLOBAL_LIST_INIT(robot_modules, list(
name = "research module"
channels = list(
CHANNEL_SCIENCE = TRUE,
CHANNEL_SUPPLY = TRUE
CHANNEL_OPERATIONS = TRUE
)
networks = list(NETWORK_RESEARCH)
sprites = list(
@@ -1080,7 +1080,7 @@ GLOBAL_LIST_INIT(robot_modules, list(
/obj/item/robot_module/mining_drone
name = "mining drone module"
no_slip = TRUE
channels = list(CHANNEL_SUPPLY = TRUE)
channels = list(CHANNEL_OPERATIONS = TRUE)
networks = list(NETWORK_MINE)
all_access = TRUE
@@ -1164,7 +1164,7 @@ GLOBAL_LIST_INIT(robot_modules, list(
)
channels = list(
CHANNEL_SERVICE = TRUE,
CHANNEL_SUPPLY = TRUE,
CHANNEL_OPERATIONS = TRUE,
CHANNEL_SCIENCE = TRUE,
CHANNEL_SECURITY = TRUE,
CHANNEL_ENGINEERING = TRUE,
@@ -1314,7 +1314,7 @@ GLOBAL_LIST_INIT(robot_modules, list(
)
channels = list(
CHANNEL_SERVICE = TRUE,
CHANNEL_SUPPLY = TRUE,
CHANNEL_OPERATIONS = TRUE,
CHANNEL_SCIENCE = TRUE,
CHANNEL_SECURITY = TRUE,
CHANNEL_ENGINEERING = TRUE,
@@ -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
@@ -25,6 +25,9 @@
var/obj/item/organ/internal/machine/internal_diagnostics/diagnostics = ipc.internal_organs_by_name[BP_DIAGNOSTICS_SUITE]
if(!istype(diagnostics))
data["broken"] = TRUE
data["patient_name"] = ipc.real_name
data["machine_ui_theme"] = machine_species.machine_ui_theme
return data
data["patient_name"] = ipc.real_name
data["broken"] = diagnostics.is_broken()