From 772299baf38e11904a5505fafd97a26bdfc4d6fd Mon Sep 17 00:00:00 2001 From: DuvelCorp Date: Sun, 13 Sep 2026 11:00:45 +0200 Subject: [PATCH] Use Black Hole celebration for max pet loyalty (6) --- api/core-level-tracking.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/api/core-level-tracking.lua b/api/core-level-tracking.lua index e07f5ef..1a9cd25 100644 --- a/api/core-level-tracking.lua +++ b/api/core-level-tracking.lua @@ -302,8 +302,13 @@ local function MTH_LT_HandlePetState() if state.loyalty and state.loyalty > 1 and state.loyalty > (tonumber(pet.loyalty) or 0) then local line = MTH_LT_LoyaltyLines[state.loyalty] or "The food arrangement appears to be working." if MTH_LT_MessageEnabled("petLoyaltyUp", true) then MTH:Print(state.name .. " reached Loyalty Level " .. state.loyalty .. ". " .. line) end - if type(MTH_FX_IsEnabled) == "function" and MTH_FX_IsEnabled("level.loyalty") and type(MTH_Celebrate) == "function" then - MTH_Celebrate(state.name .. " - Loyalty " .. state.loyalty, line, state.loyalty == 6 and "victory" or "fanfare") + if type(MTH_FX_IsEnabled) == "function" and MTH_FX_IsEnabled("level.loyalty") then + local title = state.name .. " - Loyalty " .. state.loyalty + if state.loyalty == 6 and type(MTH_CelebrateBlackHole) == "function" then + MTH_CelebrateBlackHole(title, line) + elseif type(MTH_Celebrate) == "function" then + MTH_Celebrate(title, line, "fanfare") + end end end store.pet = state @@ -339,8 +344,11 @@ function MTH_LevelTracker_Test(kind, level) local petName = state and state.name or "Your pet" local line = MTH_LT_LoyaltyLines[loyalty] or "The food arrangement appears to be working." MTH:Print(petName .. " reached Loyalty Level " .. tostring(loyalty) .. ". " .. line) - if type(MTH_Celebrate) == "function" then - MTH_Celebrate(petName .. " - Loyalty " .. tostring(loyalty), line, loyalty == 6 and "victory" or "fanfare") + local title = petName .. " - Loyalty " .. tostring(loyalty) + if loyalty == 6 and type(MTH_CelebrateBlackHole) == "function" then + MTH_CelebrateBlackHole(title, line) + elseif type(MTH_Celebrate) == "function" then + MTH_Celebrate(title, line, "fanfare") end return true end