add full disable command to macrochecker and temporarily disable swimming conditional ddue to lack of dll support

This commit is contained in:
Jrc13245
2026-02-15 10:09:34 -05:00
parent 8b1aaf1f87
commit e3cfde0506
4 changed files with 45 additions and 11 deletions
+11 -10
View File
@@ -6413,15 +6413,16 @@ CleveRoids.Keywords = {
end, conditionals, "nopet")
end,
swimming = function(conditionals)
-- Check if "Aquatic Form" is in the reactive list and usable
return CleveRoids.IsReactiveUsable("Aquatic Form")
end,
noswimming = function(conditionals)
-- Check if "Aquatic Form" is NOT usable
return not CleveRoids.IsReactiveUsable("Aquatic Form")
end,
-- TODO: swimming/noswimming disabled - IsSpellUsable doesn't check environmental
-- requirements (swimming state is server-side only). Revisit when DLL mods expose
-- movement flags or IsSwimming() API.
-- swimming = function(conditionals)
-- return CleveRoids.IsReactiveUsable("Aquatic Form")
-- end,
--
-- noswimming = function(conditionals)
-- return not CleveRoids.IsReactiveUsable("Aquatic Form")
-- end,
distance = function(conditionals)
if not CleveRoids.hasUnitXP then return false end
@@ -7705,7 +7706,7 @@ CleveRoids.STATIC_CONDITIONALS = {
form = true, noform = true, stance = true, nostance = true,
equipped = true, noequipped = true,
mod = true, nomod = true,
swimming = true, noswimming = true,
-- swimming = true, noswimming = true, -- disabled: no client-side swimming detection
resting = true, noresting = true,
}
+23
View File
@@ -490,6 +490,10 @@ frame:SetScript("OnEvent", function()
if type(CleveRoidMacros.refresh) ~= "number" then
CleveRoidMacros.refresh = 5
end
if type(CleveRoidMacros.macrocheck) ~= "number" then
CleveRoidMacros.macrocheck = 1 -- enabled by default
end
end)
-- Queues a full update of all action bars.
@@ -5807,11 +5811,13 @@ SlashCmdList["CLEVEROID"] = function(msg)
CleveRoids.Print("Current Settings:")
DEFAULT_CHAT_FRAME:AddMessage("realtime (force fast updates, CPU intensive) = " .. CleveRoidMacros.realtime .. " (Default: 0)")
DEFAULT_CHAT_FRAME:AddMessage("refresh (updates per second) = " .. CleveRoidMacros.refresh .. " (Default: 5)")
DEFAULT_CHAT_FRAME:AddMessage("macrocheck (syntax checker) = " .. CleveRoidMacros.macrocheck .. " (Default: 1)")
DEFAULT_CHAT_FRAME:AddMessage("debug (show learning messages) = " .. (CleveRoids.debug and "1" or "0") .. " (Default: 0)")
DEFAULT_CHAT_FRAME:AddMessage(" ")
CleveRoids.Print("Available Commands:")
DEFAULT_CHAT_FRAME:AddMessage("/cleveroid realtime 0 or 1 - Force realtime updates")
DEFAULT_CHAT_FRAME:AddMessage("/cleveroid refresh X - Set refresh rate (1-10 updates/sec)")
DEFAULT_CHAT_FRAME:AddMessage("/cleveroid macrocheck 0 or 1 - Enable/disable macro syntax checker")
if CleveRoids.hasSuperwow then
DEFAULT_CHAT_FRAME:AddMessage("/cleveroid learn <spellID> <duration> - Manually set spell duration")
DEFAULT_CHAT_FRAME:AddMessage("/cleveroid forget <spellID|all> - Forget learned duration(s)")
@@ -5878,6 +5884,23 @@ SlashCmdList["CLEVEROID"] = function(msg)
return
end
-- macrocheck
if cmd == "macrocheck" then
local num = tonumber(val)
if num == 0 or num == 1 then
CleveRoidMacros.macrocheck = num
if num == 1 then
CleveRoids.Print("Macro syntax checker |cff00ff00enabled|r")
else
CleveRoids.Print("Macro syntax checker |cffff0000disabled|r (reload UI to take effect)")
end
else
CleveRoids.Print("Usage: /cleveroid macrocheck 0 or 1 - Enable/disable macro syntax checker (Default: 1)")
CleveRoids.Print("Current macrocheck = " .. tostring(CleveRoidMacros.macrocheck))
end
return
end
-- learn (manual set duration)
if cmd == "learn" then
if not CleveRoids.hasSuperwow then
+3
View File
@@ -985,6 +985,9 @@ function Extension.OnAddonLoaded()
end
function Extension.OnLoad()
-- Skip if macro checker is disabled
if CleveRoidMacros and CleveRoidMacros.macrocheck == 0 then return end
-- Skip if SuperMacro is loaded (detected at load time)
if SuperMacroFrame ~= nil then return end
+8 -1
View File
@@ -1155,6 +1155,11 @@ end
-- Slash command
SLASH_MACROCHECK1 = "/macrocheck"
SlashCmdList.MACROCHECK = function(msg)
if CleveRoidMacros and CleveRoidMacros.macrocheck == 0 then
CleveRoids.Print("Macro syntax checker is disabled. Enable with /cleveroid macrocheck 1")
return
end
local success, result = pcall(function()
msg = safeTrim(msg or "")
@@ -1170,4 +1175,6 @@ SlashCmdList.MACROCHECK = function(msg)
end
end
CleveRoids.Print("Macro syntax checker loaded. Use /macrocheck [macroname] or /macrocheck all")
if not CleveRoidMacros or CleveRoidMacros.macrocheck ~= 0 then
CleveRoids.Print("Macro syntax checker loaded. Use /macrocheck [macroname] or /macrocheck all")
end