From 87da794c48c89c7e13fa481e28eec95f1f10c44c Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Fri, 17 Jul 2026 13:32:16 +0200 Subject: [PATCH] Fixes the cooking codex searching and some duplicate entry shenanigans (#22855) Cargo orders would have trouble clearing the list of orders shown without reloading the ui, due to a lack of unique ID if there was several of the same item. The same applied to the cooking codex. This is fixed now. This also fixes the cooking codex search. --- .../subsystems/initialization/codex.dm | 5 +++++ html/changelogs/TGUISearchFixing.yml | 7 +++++++ tgui/packages/tgui/interfaces/CargoControl.tsx | 2 +- tgui/packages/tgui/interfaces/CargoDelivery.tsx | 2 +- tgui/packages/tgui/interfaces/CargoOrder.tsx | 4 ++-- tgui/packages/tgui/interfaces/CookingCodex.tsx | 17 +++++++---------- 6 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 html/changelogs/TGUISearchFixing.yml diff --git a/code/controllers/subsystems/initialization/codex.dm b/code/controllers/subsystems/initialization/codex.dm index ab014562b0b..3d60b85aaa4 100644 --- a/code/controllers/subsystems/initialization/codex.dm +++ b/code/controllers/subsystems/initialization/codex.dm @@ -34,6 +34,9 @@ SUBSYSTEM_DEF(codex) var/singleton/recipe/recipe = GET_SINGLETON(reaction_path) var/list/cookingRecipeData = list() + // ID for TGUI to use + cookingRecipeData["id"] = "[reaction_path]" + // result var/obj/item/recipe_result = recipe.result cookingRecipeData["result"] = initial(recipe_result.name) @@ -74,6 +77,8 @@ SUBSYSTEM_DEF(codex) cookingRecipeData["ingredients"] += "[reagent.name] coating" // kitchen appliance + cookingRecipeData["appliances"] = "" + if(recipe.appliance) cookingRecipeData["appliances"] = recipe.get_appliance_names() diff --git a/html/changelogs/TGUISearchFixing.yml b/html/changelogs/TGUISearchFixing.yml new file mode 100644 index 00000000000..0b0c59665fb --- /dev/null +++ b/html/changelogs/TGUISearchFixing.yml @@ -0,0 +1,7 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - bugfix: "Fixed the bugged search function in the cooking codex." + - bugfix: "Fixed potential duplicate and entries not being removed in the cooking codex and cargo programs." diff --git a/tgui/packages/tgui/interfaces/CargoControl.tsx b/tgui/packages/tgui/interfaces/CargoControl.tsx index 204826e06e3..7924bd18644 100644 --- a/tgui/packages/tgui/interfaces/CargoControl.tsx +++ b/tgui/packages/tgui/interfaces/CargoControl.tsx @@ -268,7 +268,7 @@ export const CargoControl = (props) => {