|
|
@ -189,6 +189,20 @@ for i = 1, #bastionFiles do |
|
|
|
Bastion:Require(bastionFiles[i]) |
|
|
|
Bastion:Require(bastionFiles[i]) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---@param toggle? boolean |
|
|
|
|
|
|
|
function Bastion:Toggle(toggle) |
|
|
|
|
|
|
|
Bastion.Enabled = type(toggle) ~= "nil" and toggle or not Bastion.Enabled |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bastion.Globals.Command:Register('toggle', 'Toggle bastion on/off', function() |
|
|
|
|
|
|
|
Bastion:Toggle() |
|
|
|
|
|
|
|
if Bastion.Enabled then |
|
|
|
|
|
|
|
Bastion.Util:Print("Enabled") |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
Bastion.Util:Print("Disabled") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
Bastion.Globals.CombatTimer = Bastion.Timer:New("combat", function() |
|
|
|
Bastion.Globals.CombatTimer = Bastion.Timer:New("combat", function() |
|
|
|
return UnitAffectingCombat("player") |
|
|
|
return UnitAffectingCombat("player") |
|
|
|
end) |
|
|
|
end) |
|
|
|