Skip to content

Commit

Permalink
Very minor efficiency tweak to ItemRack
Browse files Browse the repository at this point in the history
Might as well do this while Outfit() related stuff is being touched.
  • Loading branch information
veechs committed Jan 25, 2025
1 parent f621535 commit 4e42b73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Config/RuleFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,8 @@ Bagshui.config.RuleFunctions = {

-- Borrowing some code from ItemRack because it doesn't provide an
-- isolated function to parse an itemLink into their format.
local _ ,_, id = string.find(rules.item.itemLink or "", "(item:%d+:%d+:%d+:%d+)")
local _ ,_, itemRackItemId = string.find(id or "", "item:(%d+:%d+:%d+):%d+")
if not itemRackItemId or (type(itemRackItemId) == "string" and string.len(itemRackItemId) == 0) then
local found ,_, itemRackItemId = string.find(rules.item.itemLink or "", "item:(%d+:%d+:%d+):%d+")
if not found or (type(itemRackItemId) == "string" and string.len(itemRackItemId) == 0) then
return false
end

Expand Down

0 comments on commit 4e42b73

Please sign in to comment.