From 24e56078bd38ec986271bddbf2a979725969bd76 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 6 May 2025 22:09:52 +0200 Subject: [PATCH] Rename from Reloaded to Daved Because now it's in my hands! --- ActionBarSaverReloaded.toc | 12 +++++------ Actions.lua | 41 ++++++++++++++++++++++---------------- KeybindSaver.lua | 18 ++++++++--------- Main.lua | 6 +++--- README.md | 4 ++-- deploy.sh | 10 +++++----- release.sh | 27 +++++++++++-------------- 7 files changed, 61 insertions(+), 57 deletions(-) diff --git a/ActionBarSaverReloaded.toc b/ActionBarSaverReloaded.toc index 4555c0a..0812f37 100644 --- a/ActionBarSaverReloaded.toc +++ b/ActionBarSaverReloaded.toc @@ -1,9 +1,9 @@ -## Interface: 40400 -## Title: ActionBarSaver: Reloaded -## Version: 1.0.7 -## Notes: Manage, save, and restore action bar profiles -## Author: Voodoomoose -## SavedVariables: ActionBarSaverReloaded, KeybindSaverReloaded +## Interface: 70300 +## Title: ActionBarSaver: Daved +## Version: 1.0.0 +## Notes: Manage, save, restore, import and export action bar and keybind profiles +## Author: Phat phuck dave +## SavedVariables: ActionBarSaverDaved, KeybindSaverDaved B64.lua Constants.lua diff --git a/Actions.lua b/Actions.lua index ed4d28e..ac3a2cf 100644 --- a/Actions.lua +++ b/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 - Brings up a dialog to export the given ") print("/abs import - Brings up a dialog to import the given ") + print("KBS Slash commands") + print("/kbs save - Saves your current keybind setup under the given ") + print("/kbs restore - Restores the saved ") + print("/kbs delete - Deletes the saved ") + print("/kbs list - Lists all saved sets") + print("/kbs export - Brings up a dialog to export the given ") + print("/kbs import - Brings up a dialog to import the given ") end SlashCmdList["ABS"] = function(argv) diff --git a/KeybindSaver.lua b/KeybindSaver.lua index 667c420..8722a16 100644 --- a/KeybindSaver.lua +++ b/KeybindSaver.lua @@ -6,8 +6,8 @@ frame:RegisterEvent("ADDON_LOADED") frame:SetScript("OnEvent", function(self, event, addon) if addon ~= ADDON_NAME then return end - KeybindSaverReloaded = KeybindSaverReloaded or {} - KeybindSaverReloaded.sets = KeybindSaverReloaded.sets or {} + KeybindSaverDaved = KeybindSaverDaved or {} + KeybindSaverDaved.sets = KeybindSaverDaved.sets or {} end) -- Create the import/export frame @@ -78,7 +78,7 @@ local function SaveSet(setName) } end end - KeybindSaverReloaded.sets[setName] = set + KeybindSaverDaved.sets[setName] = set print(string.format("Saved keybind set '%s'!", setName)) end @@ -88,7 +88,7 @@ local function RestoreSet(setName) return end - local set = KeybindSaverReloaded.sets[setName] + local set = KeybindSaverDaved.sets[setName] if not set then print(string.format("No set with the name '%s' exists", setName)) return @@ -114,18 +114,18 @@ local function DeleteSet(setName) return end - if not KeybindSaverReloaded.sets[setName] then + if not KeybindSaverDaved.sets[setName] then print(string.format("No set with the name '%s' exists", setName)) return end - KeybindSaverReloaded.sets[setName] = nil + KeybindSaverDaved.sets[setName] = nil print(string.format("Deleted keybind set '%s'", setName)) end local function ListSets() local sets = {} - for setName in pairs(KeybindSaverReloaded.sets) do + for setName in pairs(KeybindSaverDaved.sets) do table.insert(sets, setName) end table.sort(sets) @@ -139,7 +139,7 @@ local function ListSets() end local function ExportSet(setName) - local set = KeybindSaverReloaded.sets[setName] + local set = KeybindSaverDaved.sets[setName] if not set then print(string.format("No set with the name '%s' exists", setName)) return @@ -178,7 +178,7 @@ local function ImportSet(setName, importStr) end end - KeybindSaverReloaded.sets[setName] = set + KeybindSaverDaved.sets[setName] = set print(string.format("Imported keybind set '%s'", setName)) end diff --git a/Main.lua b/Main.lua index 06b7e65..eb05127 100644 --- a/Main.lua +++ b/Main.lua @@ -5,9 +5,9 @@ frame:RegisterEvent("ADDON_LOADED") frame:SetScript("OnEvent", function(self, event, addon) if addon ~= ADDON_NAME then return end - ActionBarSaverReloaded = ActionBarSaverReloaded or {} - ActionBarSaverReloaded.spellAliases = ActionBarSaverReloaded.spellAliases or {} - ActionBarSaverReloaded.sets = ActionBarSaverReloaded.sets or {} + ActionBarSaverDaved = ActionBarSaverDaved or {} + ActionBarSaverDaved.spellAliases = ActionBarSaverDaved.spellAliases or {} + ActionBarSaverDaved.sets = ActionBarSaverDaved.sets or {} end) -- function ABS:OnInitialize() diff --git a/README.md b/README.md index 14e321d..e73c794 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# ActionBarSaver:Reloaded +# ActionBarSaver:Daved ## 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. diff --git a/deploy.sh b/deploy.sh index eaa569d..731bddc 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,5 @@ -mkdir ActionBarSaverReloaded -cp -r *.lua ActionBarSaverReloaded -cp -r *.toc ActionBarSaverReloaded -7z a ActionBarSaverReloaded.zip ActionBarSaverReloaded -rm -rf ActionBarSaverReloaded +mkdir ABS +cp -r *.lua ABS +cp -r *.toc ABS +7z a ABS.zip ABS +rm -rf ABS diff --git a/release.sh b/release.sh index 8a65489..f9cdd77 100644 --- a/release.sh +++ b/release.sh @@ -15,26 +15,23 @@ fi echo "Tag: $TAG" echo "Building the thing..." -sed -i "s/## Version: .*/## Version: $TAG/" Heimdall.toc -sed -i "s/local VERSION = .*/local VERSION = \"$TAG\"/" Heimdall.lua -git add Heimdall.toc Heimdall.lua +sed -i "s/## Version: .*/## Version: $TAG/" ActionBarSaverDaved.toc +sed -i "s/local VERSION = .*/local VERSION = \"$TAG\"/" ActionBarSaverDaved.lua +git add ActionBarSaverDaved.toc ActionBarSaverDaved.lua git commit -m "Release $TAG" git tag -f $TAG git push origin $TAG -rm Heimdall-${TAG}.zip -mkdir Heimdall -cp *.lua *.toc Heimdall -cp -r Modules Heimdall -cp -r Sounds Heimdall -cp -r Texture Heimdall -7z a Heimdall-${TAG}.zip Heimdall -rm -rf Heimdall +rm ActionBarSaverDaved-${TAG}.zip +mkdir ActionBarSaverDaved +cp *.lua *.toc ActionBarSaverDaved +7z a ActionBarSaverDaved-${TAG}.zip ActionBarSaverDaved +rm -rf ActionBarSaverDaved echo "Creating a release..." TOKEN="$GITEA_API_KEY" GITEA="https://git.site.quack-lab.dev" -REPO="dave/wow-ABS" +REPO="dave/wow_ABS" # Create a release RELEASE_RESPONSE=$(curl -s -X POST \ -H "Authorization: token $TOKEN" \ @@ -56,6 +53,6 @@ echo "Release ID: $RELEASE_ID" echo "Uploading the things..." curl -X POST \ -H "Authorization: token $TOKEN" \ - -F "attachment=@Heimdall-${TAG}.zip" \ - "$GITEA/api/v1/repos/$REPO/releases/${RELEASE_ID}/assets?name=Heimdall-${TAG}.zip" -rm Heimdall-${TAG}.zip + -F "attachment=@ActionBarSaverDaved-${TAG}.zip" \ + "$GITEA/api/v1/repos/$REPO/releases/${RELEASE_ID}/assets?name=ActionBarSaverDaved-${TAG}.zip" +rm ActionBarSaverDaved-${TAG}.zip