Rename from Reloaded to Daved
Because now it's in my hands!
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
## Interface: 40400
|
## Interface: 70300
|
||||||
## Title: ActionBarSaver: Reloaded
|
## Title: ActionBarSaver: Daved
|
||||||
## Version: 1.0.7
|
## Version: 1.0.0
|
||||||
## Notes: Manage, save, and restore action bar profiles
|
## Notes: Manage, save, restore, import and export action bar and keybind profiles
|
||||||
## Author: Voodoomoose
|
## Author: Phat phuck dave
|
||||||
## SavedVariables: ActionBarSaverReloaded, KeybindSaverReloaded
|
## SavedVariables: ActionBarSaverDaved, KeybindSaverDaved
|
||||||
|
|
||||||
B64.lua
|
B64.lua
|
||||||
Constants.lua
|
Constants.lua
|
||||||
|
|||||||
41
Actions.lua
41
Actions.lua
@@ -46,7 +46,7 @@ local function RestoreActionButton(self, index, actionButton)
|
|||||||
|
|
||||||
if not actionButton then return true, nil end
|
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)
|
table.insert(aliases, actionButton.id)
|
||||||
|
|
||||||
for _, id in ipairs(aliases) do
|
for _, id in ipairs(aliases) do
|
||||||
@@ -117,7 +117,7 @@ function SaveSet(setName)
|
|||||||
} end
|
} end
|
||||||
end
|
end
|
||||||
|
|
||||||
ActionBarSaverReloaded.sets[setName] = set
|
ActionBarSaverDaved.sets[setName] = set
|
||||||
print(string.format("Saved set '%s'!", setName))
|
print(string.format("Saved set '%s'!", setName))
|
||||||
for _, warning in ipairs(warnings) do
|
for _, warning in ipairs(warnings) do
|
||||||
print(warning)
|
print(warning)
|
||||||
@@ -130,7 +130,7 @@ function RestoreSet(setName)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local set = ActionBarSaverReloaded.sets[setName]
|
local set = ActionBarSaverDaved.sets[setName]
|
||||||
|
|
||||||
if not set then
|
if not set then
|
||||||
print(string.format("No set with the name '%s' exists", setName))
|
print(string.format("No set with the name '%s' exists", setName))
|
||||||
@@ -190,19 +190,19 @@ function DeleteSet(setName)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not ActionBarSaverReloaded.sets[setName] then
|
if not ActionBarSaverDaved.sets[setName] then
|
||||||
print(string.format("No set with the name '%s' exists", setName))
|
print(string.format("No set with the name '%s' exists", setName))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
ActionBarSaverReloaded.sets[setName] = nil
|
ActionBarSaverDaved.sets[setName] = nil
|
||||||
|
|
||||||
print(string.format("Deleted set '%s'", setName))
|
print(string.format("Deleted set '%s'", setName))
|
||||||
end
|
end
|
||||||
|
|
||||||
function ListSets()
|
function ListSets()
|
||||||
local sets = {}
|
local sets = {}
|
||||||
for setName, foo in pairs(ActionBarSaverReloaded.sets) do
|
for setName, foo in pairs(ActionBarSaverDaved.sets) do
|
||||||
sets[#sets + 1] = setName
|
sets[#sets + 1] = setName
|
||||||
end
|
end
|
||||||
table.sort(sets)
|
table.sort(sets)
|
||||||
@@ -226,7 +226,7 @@ function AliasSpell(args)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local aliases = ActionBarSaverReloaded.spellAliases[spellID] or {}
|
local aliases = ActionBarSaverDaved.spellAliases[spellID] or {}
|
||||||
|
|
||||||
for _, id in ipairs(aliases) do
|
for _, id in ipairs(aliases) do
|
||||||
if id == aliasID then
|
if id == aliasID then
|
||||||
@@ -235,7 +235,7 @@ function AliasSpell(args)
|
|||||||
end
|
end
|
||||||
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))
|
print(string.format("Added %d as an alias for %d", aliasID, spellID))
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -247,18 +247,18 @@ function DeleteSpellAliases(spellID)
|
|||||||
|
|
||||||
spellID = tonumber(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))
|
print(string.format("No aliases to remove for spell with ID %d", spellID))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
ActionBarSaverReloaded.spellAliases[spellID] = nil
|
ActionBarSaverDaved.spellAliases[spellID] = nil
|
||||||
|
|
||||||
print(string.format("Removed all aliases for spell with ID %d", spellID))
|
print(string.format("Removed all aliases for spell with ID %d", spellID))
|
||||||
end
|
end
|
||||||
|
|
||||||
function ListAliases()
|
function ListAliases()
|
||||||
local aliases = ActionBarSaverReloaded.spellAliases
|
local aliases = ActionBarSaverDaved.spellAliases
|
||||||
|
|
||||||
if Dict.isEmpty(aliases) then
|
if Dict.isEmpty(aliases) then
|
||||||
print("No aliases found")
|
print("No aliases found")
|
||||||
@@ -266,7 +266,7 @@ function ListAliases()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Dict.iter(
|
Dict.iter(
|
||||||
ActionBarSaverReloaded.spellAliases,
|
ActionBarSaverDaved.spellAliases,
|
||||||
function(spellID, aliases)
|
function(spellID, aliases)
|
||||||
print(string.format("Spell %d is aliased by: %s", spellID, table.concat(aliases, ", ")))
|
print(string.format("Spell %d is aliased by: %s", spellID, table.concat(aliases, ", ")))
|
||||||
end
|
end
|
||||||
@@ -354,7 +354,7 @@ importExportFrameTextBox:SetScript("OnEscapePressed", function(self)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
function ExportSet(setName)
|
function ExportSet(setName)
|
||||||
local set = ActionBarSaverReloaded.sets[setName]
|
local set = ActionBarSaverDaved.sets[setName]
|
||||||
if not set then
|
if not set then
|
||||||
print(string.format("No set with the name '%s' exists", setName))
|
print(string.format("No set with the name '%s' exists", setName))
|
||||||
return
|
return
|
||||||
@@ -455,7 +455,7 @@ function ImportSet(setName, str)
|
|||||||
ImportMacro(str)
|
ImportMacro(str)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local set = ActionBarSaverReloaded.sets[setName] or {}
|
local set = ActionBarSaverDaved.sets[setName] or {}
|
||||||
-- if set then
|
-- if set then
|
||||||
-- print(string.format("Set '%s' already exists", setName))
|
-- print(string.format("Set '%s' already exists", setName))
|
||||||
-- return
|
-- return
|
||||||
@@ -471,9 +471,9 @@ function ImportSet(setName, str)
|
|||||||
} end
|
} end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- /dump ActionBarSaverReloaded.sets["havoc"]
|
-- /dump ActionBarSaverDaved.sets["havoc"]
|
||||||
-- /dump ActionBarSaverReloaded.sets["havoc2"]
|
-- /dump ActionBarSaverDaved.sets["havoc2"]
|
||||||
ActionBarSaverReloaded.sets[setName] = set
|
ActionBarSaverDaved.sets[setName] = set
|
||||||
print(string.format("Imported set '%s'", setName))
|
print(string.format("Imported set '%s'", setName))
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -499,6 +499,13 @@ function PrintUsage()
|
|||||||
print("/abs aliases - List all spell aliases")
|
print("/abs aliases - List all spell aliases")
|
||||||
print("/abs export <set> - Brings up a dialog to export the given <set>")
|
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("/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
|
end
|
||||||
|
|
||||||
SlashCmdList["ABS"] = function(argv)
|
SlashCmdList["ABS"] = function(argv)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ frame:RegisterEvent("ADDON_LOADED")
|
|||||||
frame:SetScript("OnEvent", function(self, event, addon)
|
frame:SetScript("OnEvent", function(self, event, addon)
|
||||||
if addon ~= ADDON_NAME then return end
|
if addon ~= ADDON_NAME then return end
|
||||||
|
|
||||||
KeybindSaverReloaded = KeybindSaverReloaded or {}
|
KeybindSaverDaved = KeybindSaverDaved or {}
|
||||||
KeybindSaverReloaded.sets = KeybindSaverReloaded.sets or {}
|
KeybindSaverDaved.sets = KeybindSaverDaved.sets or {}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Create the import/export frame
|
-- Create the import/export frame
|
||||||
@@ -78,7 +78,7 @@ local function SaveSet(setName)
|
|||||||
} end
|
} end
|
||||||
end
|
end
|
||||||
|
|
||||||
KeybindSaverReloaded.sets[setName] = set
|
KeybindSaverDaved.sets[setName] = set
|
||||||
print(string.format("Saved keybind set '%s'!", setName))
|
print(string.format("Saved keybind set '%s'!", setName))
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ local function RestoreSet(setName)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local set = KeybindSaverReloaded.sets[setName]
|
local set = KeybindSaverDaved.sets[setName]
|
||||||
if not set then
|
if not set then
|
||||||
print(string.format("No set with the name '%s' exists", setName))
|
print(string.format("No set with the name '%s' exists", setName))
|
||||||
return
|
return
|
||||||
@@ -114,18 +114,18 @@ local function DeleteSet(setName)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not KeybindSaverReloaded.sets[setName] then
|
if not KeybindSaverDaved.sets[setName] then
|
||||||
print(string.format("No set with the name '%s' exists", setName))
|
print(string.format("No set with the name '%s' exists", setName))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
KeybindSaverReloaded.sets[setName] = nil
|
KeybindSaverDaved.sets[setName] = nil
|
||||||
print(string.format("Deleted keybind set '%s'", setName))
|
print(string.format("Deleted keybind set '%s'", setName))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ListSets()
|
local function ListSets()
|
||||||
local sets = {}
|
local sets = {}
|
||||||
for setName in pairs(KeybindSaverReloaded.sets) do
|
for setName in pairs(KeybindSaverDaved.sets) do
|
||||||
table.insert(sets, setName)
|
table.insert(sets, setName)
|
||||||
end
|
end
|
||||||
table.sort(sets)
|
table.sort(sets)
|
||||||
@@ -139,7 +139,7 @@ local function ListSets()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function ExportSet(setName)
|
local function ExportSet(setName)
|
||||||
local set = KeybindSaverReloaded.sets[setName]
|
local set = KeybindSaverDaved.sets[setName]
|
||||||
if not set then
|
if not set then
|
||||||
print(string.format("No set with the name '%s' exists", setName))
|
print(string.format("No set with the name '%s' exists", setName))
|
||||||
return
|
return
|
||||||
@@ -178,7 +178,7 @@ local function ImportSet(setName, importStr)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
KeybindSaverReloaded.sets[setName] = set
|
KeybindSaverDaved.sets[setName] = set
|
||||||
print(string.format("Imported keybind set '%s'", setName))
|
print(string.format("Imported keybind set '%s'", setName))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
6
Main.lua
6
Main.lua
@@ -5,9 +5,9 @@ frame:RegisterEvent("ADDON_LOADED")
|
|||||||
frame:SetScript("OnEvent", function(self, event, addon)
|
frame:SetScript("OnEvent", function(self, event, addon)
|
||||||
if addon ~= ADDON_NAME then return end
|
if addon ~= ADDON_NAME then return end
|
||||||
|
|
||||||
ActionBarSaverReloaded = ActionBarSaverReloaded or {}
|
ActionBarSaverDaved = ActionBarSaverDaved or {}
|
||||||
ActionBarSaverReloaded.spellAliases = ActionBarSaverReloaded.spellAliases or {}
|
ActionBarSaverDaved.spellAliases = ActionBarSaverDaved.spellAliases or {}
|
||||||
ActionBarSaverReloaded.sets = ActionBarSaverReloaded.sets or {}
|
ActionBarSaverDaved.sets = ActionBarSaverDaved.sets or {}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- function ABS:OnInitialize()
|
-- function ABS:OnInitialize()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# ActionBarSaver:Reloaded
|
# ActionBarSaver:Daved
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
ActionBarSaver:Reloaded is an addon for saving and restoring action bar profiles. It is based on the original ActionBarSaver addon but is a full re-write.
|
ActionBarSaver:Daved is an addon for saving and restoring action bar profiles. It is based on the original ActionBarSaver addon but is a full re-write.
|
||||||
|
|
||||||
All sets are saved by class rather than by character. Additionally, when you list profiles, you will only see profiles that pertain to your class.
|
All sets are saved by class rather than by character. Additionally, when you list profiles, you will only see profiles that pertain to your class.
|
||||||
|
|
||||||
|
|||||||
10
deploy.sh
10
deploy.sh
@@ -1,5 +1,5 @@
|
|||||||
mkdir ActionBarSaverReloaded
|
mkdir ABS
|
||||||
cp -r *.lua ActionBarSaverReloaded
|
cp -r *.lua ABS
|
||||||
cp -r *.toc ActionBarSaverReloaded
|
cp -r *.toc ABS
|
||||||
7z a ActionBarSaverReloaded.zip ActionBarSaverReloaded
|
7z a ABS.zip ABS
|
||||||
rm -rf ActionBarSaverReloaded
|
rm -rf ABS
|
||||||
|
|||||||
27
release.sh
27
release.sh
@@ -15,26 +15,23 @@ fi
|
|||||||
echo "Tag: $TAG"
|
echo "Tag: $TAG"
|
||||||
|
|
||||||
echo "Building the thing..."
|
echo "Building the thing..."
|
||||||
sed -i "s/## Version: .*/## Version: $TAG/" Heimdall.toc
|
sed -i "s/## Version: .*/## Version: $TAG/" ActionBarSaverDaved.toc
|
||||||
sed -i "s/local VERSION = .*/local VERSION = \"$TAG\"/" Heimdall.lua
|
sed -i "s/local VERSION = .*/local VERSION = \"$TAG\"/" ActionBarSaverDaved.lua
|
||||||
git add Heimdall.toc Heimdall.lua
|
git add ActionBarSaverDaved.toc ActionBarSaverDaved.lua
|
||||||
git commit -m "Release $TAG"
|
git commit -m "Release $TAG"
|
||||||
git tag -f $TAG
|
git tag -f $TAG
|
||||||
git push origin $TAG
|
git push origin $TAG
|
||||||
|
|
||||||
rm Heimdall-${TAG}.zip
|
rm ActionBarSaverDaved-${TAG}.zip
|
||||||
mkdir Heimdall
|
mkdir ActionBarSaverDaved
|
||||||
cp *.lua *.toc Heimdall
|
cp *.lua *.toc ActionBarSaverDaved
|
||||||
cp -r Modules Heimdall
|
7z a ActionBarSaverDaved-${TAG}.zip ActionBarSaverDaved
|
||||||
cp -r Sounds Heimdall
|
rm -rf ActionBarSaverDaved
|
||||||
cp -r Texture Heimdall
|
|
||||||
7z a Heimdall-${TAG}.zip Heimdall
|
|
||||||
rm -rf Heimdall
|
|
||||||
|
|
||||||
echo "Creating a release..."
|
echo "Creating a release..."
|
||||||
TOKEN="$GITEA_API_KEY"
|
TOKEN="$GITEA_API_KEY"
|
||||||
GITEA="https://git.site.quack-lab.dev"
|
GITEA="https://git.site.quack-lab.dev"
|
||||||
REPO="dave/wow-ABS"
|
REPO="dave/wow_ABS"
|
||||||
# Create a release
|
# Create a release
|
||||||
RELEASE_RESPONSE=$(curl -s -X POST \
|
RELEASE_RESPONSE=$(curl -s -X POST \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
@@ -56,6 +53,6 @@ echo "Release ID: $RELEASE_ID"
|
|||||||
echo "Uploading the things..."
|
echo "Uploading the things..."
|
||||||
curl -X POST \
|
curl -X POST \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-F "attachment=@Heimdall-${TAG}.zip" \
|
-F "attachment=@ActionBarSaverDaved-${TAG}.zip" \
|
||||||
"$GITEA/api/v1/repos/$REPO/releases/${RELEASE_ID}/assets?name=Heimdall-${TAG}.zip"
|
"$GITEA/api/v1/repos/$REPO/releases/${RELEASE_ID}/assets?name=ActionBarSaverDaved-${TAG}.zip"
|
||||||
rm Heimdall-${TAG}.zip
|
rm ActionBarSaverDaved-${TAG}.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user