fix: sort cooking

This commit is contained in:
Salikh Gurgenidze
2025-12-25 01:02:44 +04:00
parent 821cbd5ba2
commit d71de1fd7f
3 changed files with 40 additions and 22 deletions
+5
View File
@@ -564,6 +564,11 @@ local function AddSortKeys(items)
-- Texture pattern for grouping similar items (especially trade goods)
item.texturePattern = GetTexturePattern(itemTexture)
-- Group Trade Goods that are meats/eggs together regardless of texture
local nameLower = item.itemName and string.lower(item.itemName) or ""
if itemType == "Trade Goods" and (string.find(nameLower, "meat") or string.find(nameLower, "egg")) then
item.texturePattern = "trade_meat_egg"
end
-- Inverted values for descending sorts
item.invertedQuality = -(tonumber(itemRarity) or 0)