Skip to content

Instantly share code, notes, and snippets.

@jkhsjdhjs
Last active February 22, 2022 18:40
Show Gist options
  • Save jkhsjdhjs/377090a226988f69ac99f4eee690d312 to your computer and use it in GitHub Desktop.
Save jkhsjdhjs/377090a226988f69ac99f4eee690d312 to your computer and use it in GitHub Desktop.
Patch for making AutoCategory_DressingRoom compatible with empty gear sets
--- main.lua 2022-02-22 19:37:54.963712905 +0100
+++ main.lua.bak 2022-02-22 19:39:10.935461185 +0100
@@ -5,9 +5,10 @@
local gearSet = DressingRoom.sv.gearSet
if #args == 0 then
- -- TODO
- for i, _ in ipairs(gearSet) do
- args[i] = i
+ local count = 1
+ for i, _ in pairs(gearSet) do
+ args[count] = i
+ count = count + 1
end
end
@@ -16,7 +17,7 @@
error(string.format("error: dressingroom: argument must be a number"))
end
- if set <= #gearSet then
+ if gearSet[set] then
local itemId = GetItemUniqueId(AutoCategory.checkingItemBagId, AutoCategory.checkingItemSlotIndex)
for item, _ in pairs(gearSet[set]) do
if item == Id64ToString(itemId) then
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment