From f7779fe9fcc9517c24342a46f00c3d6ff956b80d Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 7 Aug 2024 22:19:35 +0300 Subject: [PATCH] Fixed things with \improper name not dispensing from smartfridge [NO GBP] (#85538) ## About The Pull Request Added `replacetext` to clean it up before the comparison. ## Why It's Good For The Game Fix ## Changelog :cl: fix: Smartfridges properly dispense `\Improper` items /:cl: --- code/modules/food_and_drinks/machinery/smartfridge.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/food_and_drinks/machinery/smartfridge.dm b/code/modules/food_and_drinks/machinery/smartfridge.dm index 6e115af7df2..a8d07dc8d87 100644 --- a/code/modules/food_and_drinks/machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/machinery/smartfridge.dm @@ -417,7 +417,8 @@ for(var/obj/item/dispensed_item in src) if(desired <= 0) break - if(params["path"] == "[dispensed_item.type]-[dispensed_item.name]") + var/item_name = "[dispensed_item.type]-[replacetext(replacetext(dispensed_item.name, "\proper", ""), "\improper", "")]" + if(params["path"] == item_name) if(dispensed_item in component_parts) CRASH("Attempted removal of [dispensed_item] component_part from smartfridge via smartfridge interface.") //dispense the item