From 7ac524151d2d509041fa2ba753349efacfb91903 Mon Sep 17 00:00:00 2001 From: Goat <126099705+Goat-Real@users.noreply.github.com> Date: Tue, 12 Nov 2024 09:22:23 -0700 Subject: [PATCH] Makes curator inventory update when buttons are pressed. (#87841) ## About The Pull Request Adds two calls for `update_static_data_for_all_viewers()` so the UI will update when a player switches pages or removes an item in the inventory screen. ## Why It's Good For The Game Responsive UI good. When I click button UI should respond accordingly. fix #82733 ## Changelog :cl: Goat qol: Curator console's inventory screen will now update when you change pages or remove items. /:cl: --- code/modules/library/lib_machines.dm | 2 ++ code/modules/tgui/external.dm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index d7102fe9600..c3adc298b63 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -441,10 +441,12 @@ GLOBAL_VAR_INIT(library_table_modified, 0) var/id = params["book_id"] inventory -= id inventory_update() + update_static_data_for_all_viewers() return TRUE if("switch_inventory_page") inventory_page = sanitize_page_input(params["page"], inventory_page, inventory_page_count) inventory_update() + update_static_data_for_all_viewers() return TRUE if("checkout") var/list/available = list() diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index 1168b6c619a..f9e05f9e95a 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -42,7 +42,7 @@ * * required user mob The mob interacting with the UI. * - * return list Statuic Data to be sent to the UI. + * return list Static Data to be sent to the UI. */ /datum/proc/ui_static_data(mob/user) return list()