mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Alias [mouseuse] to [cursor] via a conditional alias table
Adds CleveRoids.conditionalAliases, applied in ParseMsg so a deprecated name is rewritten to its current keyword before anything downstream (evaluation, _groups) sees it. This is the mechanism for renamed modifiers, which -- unlike predicates such as [stl] -> [stealth] -- have no Keywords function an alias could simply point at. [mouseuse] now resolves to [cursor], routing old macros through ClassicAPI's C_Spell.CastAtCursor / C_Item.UseAtCursor. Drops the post-cast block that cast normally and then faked a mouse click via CameraOrSelectOrMoveStart/Stop to place the AoE circle, along with its workaround for that call spuriously starting auto-attack. MacroErrorChecker seeds VALID_CONDITIONALS from the alias table, so the old names stay valid syntax without needing a placeholder ignoreKeywords entry.
This commit is contained in:
@@ -35,6 +35,14 @@ if CleveRoids.ignoreKeywords then
|
||||
end
|
||||
end
|
||||
|
||||
-- Deprecated names still valid in macros; ParseMsg rewrites them to the current
|
||||
-- keyword, so they never reach Keywords/ignoreKeywords under their old name.
|
||||
if CleveRoids.conditionalAliases then
|
||||
for alias, _ in pairs(CleveRoids.conditionalAliases) do
|
||||
VALID_CONDITIONALS[alias] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Known valid commands
|
||||
local VALID_COMMANDS = {
|
||||
-- Core commands NOT registered via SlashCmdList (so not auto-discoverable):
|
||||
|
||||
Reference in New Issue
Block a user