From 9566e0eddedb400a574d2524b7ccc3806aecefa0 Mon Sep 17 00:00:00 2001 From: varttist Date: Thu, 5 Nov 2026 20:56:36 +0300 Subject: [PATCH] `CraftSystem`: `BaseCraftHandler`: use `Smc.matchItemDescription()` --- .../CraftSystem/src/CraftSystem/BaseCraftHandler.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mods/CORE/CraftSystem/src/CraftSystem/BaseCraftHandler.lua b/mods/CORE/CraftSystem/src/CraftSystem/BaseCraftHandler.lua index 2ea6873..c6839c3 100644 --- a/mods/CORE/CraftSystem/src/CraftSystem/BaseCraftHandler.lua +++ b/mods/CORE/CraftSystem/src/CraftSystem/BaseCraftHandler.lua @@ -239,14 +239,7 @@ local function getMathedCrafts(crafts, pattern) local matchedCrafts = {} for _, craft in ipairs(crafts) do - local outputItem = ItemStack(craft.output) - local itemSettings = Smc.getItemDefinition(outputItem).settings - local ruName = stringLower(core.get_translated_string('ru', itemSettings._title)) - local enName = stringLower(core.get_translated_string('en', itemSettings._title)) - - if stringMatch(outputItem:get_name(), pattern) or - stringMatch(ruName, pattern) or - stringMatch(enName, pattern) then + if Smc.matchItemDescription(ItemStack(craft.output):get_name(), pattern) then tableInsert(matchedCrafts, craft) end end