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:
@@ -187,11 +187,19 @@ CleveRoids.ignoreKeywords = {
|
||||
_operators = true, -- Metadata for AND/OR operator tracking
|
||||
_groups = true, -- Grouped conditional values for AND/OR evaluation
|
||||
multiscan = true, -- Processed before Keywords loop (target resolution)
|
||||
mouseuse = true, -- Post-cast modifier: auto-click AOE targeting circle at cursor
|
||||
cursor = true, -- Modifier: place ground-target spell/item at cursor (CastAtCursor)
|
||||
stopattack = true, -- Post-cast modifier: stop autoattack after cast (CheapShot pattern)
|
||||
}
|
||||
|
||||
-- Deprecated conditional names, rewritten to their current keyword in ParseMsg
|
||||
-- before anything downstream (evaluation, _groups) sees them. This is the path
|
||||
-- for renamed *modifiers* -- ignoreKeywords entries, which have no Keywords
|
||||
-- predicate that an alias could just point at the way [stl] does for [stealth].
|
||||
-- MacroErrorChecker also reads this table, so the old names stay valid syntax.
|
||||
CleveRoids.conditionalAliases = {
|
||||
mouseuse = "cursor", -- pre-ClassicAPI name, back when it clicked the AoE reticle
|
||||
}
|
||||
|
||||
-- TODO: Localize?
|
||||
CleveRoids.countedItemTypes = {
|
||||
["Consumable"] = true,
|
||||
|
||||
Reference in New Issue
Block a user