From 3a305196bd3624225f70b3675a9e0f8e7c12b707 Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Sat, 11 Jan 2025 12:05:41 +0100 Subject: [PATCH] Adjusted some comments and minor codestyle --- main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.lua b/main.lua index e9f9184..1b7326d 100644 --- a/main.lua +++ b/main.lua @@ -16,7 +16,7 @@ local customCategories = {} local function printChat(message) if debug == true then - print("[BetterBags ItemRack] ".. tostring(message)) + print("[BetterBags ItemRack] " .. tostring(message)) end end @@ -33,7 +33,7 @@ local function split(s, sep) end local function updateCategories() - -- Wipe custom categories since we can't retrieve deleted set from itemRack (Except maybe store duplicate of sets and check last version of it) + -- Wipe custom categories since we can't retrieve deleted set from ItemRack (Except maybe store duplicate of sets and check last version of it) for category, _ in pairs(customCategories) do local ctx = context:New("BetterBags_ItemRack_Deletion") categories:DeleteCategory(ctx, L:G(category)) @@ -61,7 +61,7 @@ local function updateCategories() if itemSets == nil then usedItems[id] = { setName } - -- Extend existing labels and filter duplicate items per set + -- Extend existing labels and filter duplicate items per set elseif usedItems[id][setName] ~= nil then table.insert(usedItems[id], setName) end @@ -122,7 +122,7 @@ end frame:RegisterEvent("ADDON_LOADED") frame:SetScript("OnEvent", function(self, event, addon, ...) - -- Listen for this because we need the saved variable to operate + -- Technically since we don't use saved variables anymore waiting here isn't necessary, but doesn't hurt if event == "ADDON_LOADED" and addon == "BetterBags_ItemRack" then ItemRack:RegisterExternalEventListener("ITEMRACK_SET_SAVED", itemRackUpdated) ItemRack:RegisterExternalEventListener("ITEMRACK_SET_DELETED", itemRackUpdated)