Rename from Reloaded to Daved
Because now it's in my hands!
This commit is contained in:
41
Actions.lua
41
Actions.lua
@@ -46,7 +46,7 @@ local function RestoreActionButton(self, index, actionButton)
|
||||
|
||||
if not actionButton then return true, nil end
|
||||
|
||||
local aliases = ActionBarSaverReloaded.spellAliases[actionButton.id] or {}
|
||||
local aliases = ActionBarSaverDaved.spellAliases[actionButton.id] or {}
|
||||
table.insert(aliases, actionButton.id)
|
||||
|
||||
for _, id in ipairs(aliases) do
|
||||
@@ -117,7 +117,7 @@ function SaveSet(setName)
|
||||
} end
|
||||
end
|
||||
|
||||
ActionBarSaverReloaded.sets[setName] = set
|
||||
ActionBarSaverDaved.sets[setName] = set
|
||||
print(string.format("Saved set '%s'!", setName))
|
||||
for _, warning in ipairs(warnings) do
|
||||
print(warning)
|
||||
@@ -130,7 +130,7 @@ function RestoreSet(setName)
|
||||
return
|
||||
end
|
||||
|
||||
local set = ActionBarSaverReloaded.sets[setName]
|
||||
local set = ActionBarSaverDaved.sets[setName]
|
||||
|
||||
if not set then
|
||||
print(string.format("No set with the name '%s' exists", setName))
|
||||
@@ -190,19 +190,19 @@ function DeleteSet(setName)
|
||||
return
|
||||
end
|
||||
|
||||
if not ActionBarSaverReloaded.sets[setName] then
|
||||
if not ActionBarSaverDaved.sets[setName] then
|
||||
print(string.format("No set with the name '%s' exists", setName))
|
||||
return
|
||||
end
|
||||
|
||||
ActionBarSaverReloaded.sets[setName] = nil
|
||||
ActionBarSaverDaved.sets[setName] = nil
|
||||
|
||||
print(string.format("Deleted set '%s'", setName))
|
||||
end
|
||||
|
||||
function ListSets()
|
||||
local sets = {}
|
||||
for setName, foo in pairs(ActionBarSaverReloaded.sets) do
|
||||
for setName, foo in pairs(ActionBarSaverDaved.sets) do
|
||||
sets[#sets + 1] = setName
|
||||
end
|
||||
table.sort(sets)
|
||||
@@ -226,7 +226,7 @@ function AliasSpell(args)
|
||||
return
|
||||
end
|
||||
|
||||
local aliases = ActionBarSaverReloaded.spellAliases[spellID] or {}
|
||||
local aliases = ActionBarSaverDaved.spellAliases[spellID] or {}
|
||||
|
||||
for _, id in ipairs(aliases) do
|
||||
if id == aliasID then
|
||||
@@ -235,7 +235,7 @@ function AliasSpell(args)
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(ActionBarSaverReloaded.spellAliases[spellID], aliasID)
|
||||
table.insert(ActionBarSaverDaved.spellAliases[spellID], aliasID)
|
||||
print(string.format("Added %d as an alias for %d", aliasID, spellID))
|
||||
end
|
||||
|
||||
@@ -247,18 +247,18 @@ function DeleteSpellAliases(spellID)
|
||||
|
||||
spellID = tonumber(spellID)
|
||||
|
||||
if not ActionBarSaverReloaded.spellAliases[spellID] then
|
||||
if not ActionBarSaverDaved.spellAliases[spellID] then
|
||||
print(string.format("No aliases to remove for spell with ID %d", spellID))
|
||||
return
|
||||
end
|
||||
|
||||
ActionBarSaverReloaded.spellAliases[spellID] = nil
|
||||
ActionBarSaverDaved.spellAliases[spellID] = nil
|
||||
|
||||
print(string.format("Removed all aliases for spell with ID %d", spellID))
|
||||
end
|
||||
|
||||
function ListAliases()
|
||||
local aliases = ActionBarSaverReloaded.spellAliases
|
||||
local aliases = ActionBarSaverDaved.spellAliases
|
||||
|
||||
if Dict.isEmpty(aliases) then
|
||||
print("No aliases found")
|
||||
@@ -266,7 +266,7 @@ function ListAliases()
|
||||
end
|
||||
|
||||
Dict.iter(
|
||||
ActionBarSaverReloaded.spellAliases,
|
||||
ActionBarSaverDaved.spellAliases,
|
||||
function(spellID, aliases)
|
||||
print(string.format("Spell %d is aliased by: %s", spellID, table.concat(aliases, ", ")))
|
||||
end
|
||||
@@ -354,7 +354,7 @@ importExportFrameTextBox:SetScript("OnEscapePressed", function(self)
|
||||
end)
|
||||
|
||||
function ExportSet(setName)
|
||||
local set = ActionBarSaverReloaded.sets[setName]
|
||||
local set = ActionBarSaverDaved.sets[setName]
|
||||
if not set then
|
||||
print(string.format("No set with the name '%s' exists", setName))
|
||||
return
|
||||
@@ -455,7 +455,7 @@ function ImportSet(setName, str)
|
||||
ImportMacro(str)
|
||||
return
|
||||
end
|
||||
local set = ActionBarSaverReloaded.sets[setName] or {}
|
||||
local set = ActionBarSaverDaved.sets[setName] or {}
|
||||
-- if set then
|
||||
-- print(string.format("Set '%s' already exists", setName))
|
||||
-- return
|
||||
@@ -471,9 +471,9 @@ function ImportSet(setName, str)
|
||||
} end
|
||||
end
|
||||
|
||||
-- /dump ActionBarSaverReloaded.sets["havoc"]
|
||||
-- /dump ActionBarSaverReloaded.sets["havoc2"]
|
||||
ActionBarSaverReloaded.sets[setName] = set
|
||||
-- /dump ActionBarSaverDaved.sets["havoc"]
|
||||
-- /dump ActionBarSaverDaved.sets["havoc2"]
|
||||
ActionBarSaverDaved.sets[setName] = set
|
||||
print(string.format("Imported set '%s'", setName))
|
||||
end
|
||||
|
||||
@@ -499,6 +499,13 @@ function PrintUsage()
|
||||
print("/abs aliases - List all spell aliases")
|
||||
print("/abs export <set> - Brings up a dialog to export the given <set>")
|
||||
print("/abs import <set> - Brings up a dialog to import the given <set>")
|
||||
print("KBS Slash commands")
|
||||
print("/kbs save <set> - Saves your current keybind setup under the given <set>")
|
||||
print("/kbs restore <set> - Restores the saved <set>")
|
||||
print("/kbs delete <set> - Deletes the saved <set>")
|
||||
print("/kbs list - Lists all saved sets")
|
||||
print("/kbs export <set> - Brings up a dialog to export the given <set>")
|
||||
print("/kbs import <set> - Brings up a dialog to import the given <set>")
|
||||
end
|
||||
|
||||
SlashCmdList["ABS"] = function(argv)
|
||||
|
||||
Reference in New Issue
Block a user