From 315f6bb4f159e860e54eecad922c6d12289c4468 Mon Sep 17 00:00:00 2001 From: DuvelCorp Date: Tue, 15 Sep 2026 07:34:39 +0200 Subject: [PATCH 1/4] Load marker texture by actual addon folder name (case-proof) --- api/constants.lua | 17 +++++++++++++++++ api/map-markers.lua | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/api/constants.lua b/api/constants.lua index 24b74e8..089341e 100644 --- a/api/constants.lua +++ b/api/constants.lua @@ -1,6 +1,23 @@ MTH_CONST = MTH_CONST or {} MTH_CONST.version = MTH_CONST.version or "2.0.0" +-- Our AddOns folder name as actually installed. Forgejo/Codeberg zip downloads +-- force the archive's root folder to lowercase (forgejo bug #800), so resolve +-- the real casing here and build texture paths from it. +MTH_CONST.addonFolder = MTH_CONST.addonFolder or "MetaHunt" +if type(GetNumAddOns) == "function" and type(GetAddOnInfo) == "function" then + local i = 1 + local total = GetNumAddOns() or 0 + while i <= total do + local folder = GetAddOnInfo(i) + if type(folder) == "string" and string.lower(folder) == "metahunt" then + MTH_CONST.addonFolder = folder + break + end + i = i + 1 + end +end + MTH_CONST.WEAPON_TYPES = { BOWS = "Bows", CROSSBOWS = "Crossbows", diff --git a/api/map-markers.lua b/api/map-markers.lua index a8444d6..2fdb08d 100644 --- a/api/map-markers.lua +++ b/api/map-markers.lua @@ -908,7 +908,7 @@ function MTH_Map:BuildPin(parent, name, isMinimap) pin.tex = pin:CreateTexture(nil, "ARTWORK") pin.tex:SetAllPoints(pin) - pin.tex:SetTexture("Interface\\AddOns\\MetaHunt\\img\\node") + pin.tex:SetTexture("Interface\\AddOns\\" .. (MTH_CONST and MTH_CONST.addonFolder or "MetaHunt") .. "\\img\\node") pin.tex:SetVertexColor(1, 1, 1, 1) pin:SetScript("OnEnter", function() From ea01c9ef158210044a266fa73403c477417b13ad Mon Sep 17 00:00:00 2001 From: DuvelCorp Date: Tue, 15 Sep 2026 07:34:39 +0200 Subject: [PATCH 2/4] Silence pet level/loyalty notifications right after loading --- api/core-level-tracking.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/core-level-tracking.lua b/api/core-level-tracking.lua index d556c5d..810b410 100644 --- a/api/core-level-tracking.lua +++ b/api/core-level-tracking.lua @@ -4,6 +4,7 @@ local MTH_LT_Frame = nil local MTH_LT_PendingPetCheck = false +local MTH_LT_SuppressUntil = 0 local MTH_LT_HunterLines = { [1] = "You can now track beasts. Revolutionary: look for the things you intend to shoot.", @@ -293,6 +294,13 @@ local function MTH_LT_HandlePetState() store.pet = state return end + -- Just after a loading screen the pet's real level/loyalty can arrive a beat + -- late; record them as the baseline silently so we never announce progress + -- that actually happened in an earlier session (e.g. a fresh install). + if type(GetTime) == "function" and MTH_LT_SuppressUntil > 0 and GetTime() < MTH_LT_SuppressUntil then + store.pet = state + return + end if state.level > (tonumber(pet.level) or 0) then local line = MTH_LT_NextLine(store, "petLine", MTH_LT_PetLines) if MTH_LT_MessageEnabled("petLevelUp", true) then MTH:Print(state.name .. " reached level " .. state.level .. ". " .. line) end @@ -368,6 +376,7 @@ function MTH_LevelTracker_Initialize() if event == "PLAYER_ENTERING_WORLD" then local level = type(UnitLevel) == "function" and tonumber(UnitLevel("player")) or nil if level then MTH_LT_Store().hunterLevel = level end + if type(GetTime) == "function" then MTH_LT_SuppressUntil = GetTime() + 8 end MTH_LT_RequestPetCheck() elseif event == "PLAYER_LEVEL_UP" then MTH_LT_HandleHunterLevel(tonumber(arg1) or tonumber(UnitLevel("player")) or 1) From d49ed5abcccbb1b0707353b3f4f58f55df6d3554 Mon Sep 17 00:00:00 2001 From: DuvelCorp Date: Tue, 15 Sep 2026 08:06:57 +0200 Subject: [PATCH 3/4] Revert addon-folder texture resolution (assume MetaHunt folder) --- api/constants.lua | 17 ----------------- api/map-markers.lua | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/api/constants.lua b/api/constants.lua index 089341e..24b74e8 100644 --- a/api/constants.lua +++ b/api/constants.lua @@ -1,23 +1,6 @@ MTH_CONST = MTH_CONST or {} MTH_CONST.version = MTH_CONST.version or "2.0.0" --- Our AddOns folder name as actually installed. Forgejo/Codeberg zip downloads --- force the archive's root folder to lowercase (forgejo bug #800), so resolve --- the real casing here and build texture paths from it. -MTH_CONST.addonFolder = MTH_CONST.addonFolder or "MetaHunt" -if type(GetNumAddOns) == "function" and type(GetAddOnInfo) == "function" then - local i = 1 - local total = GetNumAddOns() or 0 - while i <= total do - local folder = GetAddOnInfo(i) - if type(folder) == "string" and string.lower(folder) == "metahunt" then - MTH_CONST.addonFolder = folder - break - end - i = i + 1 - end -end - MTH_CONST.WEAPON_TYPES = { BOWS = "Bows", CROSSBOWS = "Crossbows", diff --git a/api/map-markers.lua b/api/map-markers.lua index 2fdb08d..a8444d6 100644 --- a/api/map-markers.lua +++ b/api/map-markers.lua @@ -908,7 +908,7 @@ function MTH_Map:BuildPin(parent, name, isMinimap) pin.tex = pin:CreateTexture(nil, "ARTWORK") pin.tex:SetAllPoints(pin) - pin.tex:SetTexture("Interface\\AddOns\\" .. (MTH_CONST and MTH_CONST.addonFolder or "MetaHunt") .. "\\img\\node") + pin.tex:SetTexture("Interface\\AddOns\\MetaHunt\\img\\node") pin.tex:SetVertexColor(1, 1, 1, 1) pin:SetScript("OnEnter", function() From 05cfce240b43a4d75ec2c3cb15f1400fe5ce1b9a Mon Sep 17 00:00:00 2001 From: DuvelCorp Date: Tue, 15 Sep 2026 08:38:13 +0200 Subject: [PATCH 4/4] Document Gitea lowercase-folder rename step in README --- README.MD | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.MD b/README.MD index 2900bda..7cfad13 100644 --- a/README.MD +++ b/README.MD @@ -14,6 +14,16 @@ You play the best class, now you have the best companion for it (and its not you - MetaHunt is fully compatible with QUIVER <3, and is not a replacement for it. - The addon purposely disable itself on all Capycraft/Ravencraft Realms, following the DDOS attacks they conducted on other servers. + +### Installation (READ THIS!) ⚠️⚠️⚠️ + +After you download the zip, you have a manual action to do because of Gitea behaviour. + +When you unzip, you will find a "metahunt" root folder, you SHOULD rename it as exactly "MetaHunt", and then move that folder in your \Interface\AddOns\ directory. If you dont restore the capital letters in the folder name, the addon will be broken. + +This is [a known issue from Gitea/Forgejo](https://codeberg.org/forgejo/forgejo/issues/800) when the system creates zip files, and there's nothing add-on devs can do to overcome it. + + ## Twow Data MetaHunt ships with large twow datastores, and notably: