Bastion aims to serve as a highly performant, simplisitic, and expandable World of Warcraft data visualization framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bastion/scripts/frost/frost-gui.lua

55 lines
1.3 KiB

local
Tinkr,
---@type Bastion
Bastion = ...
local IcyVeins = Bastion.SpellBook:GetSpell(12472)
local FrozenOrb = Bastion.SpellBook:GetSpell(84714)
local Blizzard = Bastion.SpellBook:GetSpell(190356)
local FrostOptions = {
CdsEnabled = false,
FrozenOrbEnabled = false,
AutoAOE = true
}
Bastion.ToggleManager:Add({
id = 'Frost_CdsEnabled',
icon = IcyVeins:GetIcon(),
state = FrostOptions.CdsEnabled
})
Bastion.ToggleManager:Add({
id = 'Frost_FrozenOrbEnabled',
icon = FrozenOrb:GetIcon(),
state = FrostOptions.FrozenOrbEnabled
})
Bastion.ToggleManager:Add({
id = 'Frost_AutoAOE',
icon = Blizzard:GetIcon(),
state = FrostOptions.AutoAOE
})
---@alias GetFrostOption fun(option: "CdsEnabled" | "FrozenOrbEnabled" | 'AutoAOE'): boolean
---@type GetFrostOption
local function GetFrostOption(option)
return FrostOptions[option]
end
local Command = Bastion.Command:New('frost')
Command:Register('aoe', 'Toggle bastion on/off', function()
Bastion.ToggleManager:Toggle("Frost_AutoAOE")
end)
Command:Register('cds', 'Toggle bastion on/off', function()
Bastion.ToggleManager:Toggle("Frost_CdsEnabled")
end)
Command:Register('orb', 'Toggle bastion on/off', function()
Bastion.ToggleManager:Toggle("Frost_FrozenOrbEnabled")
end)
return GetFrostOption