mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
add full disable command to macrochecker and temporarily disable swimming conditional ddue to lack of dll support
This commit is contained in:
+11
-10
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user