From 4453412fe2f28576af37f0e4c52640aadb088db5 Mon Sep 17 00:00:00 2001 From: Joshua Kidder <49173900+Metekillot@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:38:28 -0400 Subject: [PATCH] [NO GBP] Another fix for ore silo logging interface (#92610) ## About The Pull Request This adds null-checking in the Typescript itself to create values if there are some missing, specifically with values that indicate that this is replacing a value that was null as a result of an error. It also updates another place where I forgot to correctly set user_data. ## Why It's Good For The Game Fixes more bugs. ## Changelog :cl: Bisar fix: The .tsx code for Ore Silo logs will now catch nulls instead of TBing. fix: Fixed ANOTHER place where user_data for an ore silo log wasn't set correctly. /:cl: --- code/modules/wiremod/core/component_printer.dm | 6 +++--- tgui/packages/tgui/interfaces/OreSilo.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/wiremod/core/component_printer.dm b/code/modules/wiremod/core/component_printer.dm index bece40978eb..c1f39f3d48d 100644 --- a/code/modules/wiremod/core/component_printer.dm +++ b/code/modules/wiremod/core/component_printer.dm @@ -390,7 +390,7 @@ . = ..() if (.) return - var/obj/item/card/id/advanced/user_card = astype(usr, /mob/living)?.get_idcard() + var/alist/user_data = ID_DATA(usr) switch (action) if ("print") @@ -401,14 +401,14 @@ var/list/design = scanned_designs[design_id] - if (!materials.can_use_resource(user_card)) + if (!materials.can_use_resource(user_data = user_data)) return TRUE if (!materials.mat_container.has_materials(design["materials"], efficiency_coeff)) say("Not enough materials.") return TRUE - materials.use_materials(design["materials"], efficiency_coeff, 1, "processed", design["name"], user_card) + materials.use_materials(design["materials"], efficiency_coeff, 1, design["name"], design["materials"], user_data = user_data) print_module(design) balloon_alert_to_viewers("printed [design["name"]]") if ("remove_mat") diff --git a/tgui/packages/tgui/interfaces/OreSilo.tsx b/tgui/packages/tgui/interfaces/OreSilo.tsx index 0a40cb223f7..ad6ce50d556 100644 --- a/tgui/packages/tgui/interfaces/OreSilo.tsx +++ b/tgui/packages/tgui/interfaces/OreSilo.tsx @@ -334,10 +334,10 @@ const LogsList = (props: LogsListProps) => { const UserItem = (props: UserData) => { const { - name, - age, - assignment, - account_id, + name = 'NAME_RES_FAIL', + age = 0, + assignment = 'ASSGN-RES_FAIL', + account_id = 0, account_holder, account_assignment, accesses,