3 Commits
1.2.0 ... 1.2.2

Author SHA1 Message Date
396ef0437f Release 1.2.2 2025-05-07 21:40:10 +02:00
d92fe23d8a Update meta 2025-05-07 21:40:07 +02:00
1b09f262d5 Do more hacky shit
I hate this api
2025-05-07 21:39:49 +02:00
4 changed files with 18 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
## Interface: 70300
## Title: ActionBarSaver: Daved
## Version: 1.2.0
## Version: 1.2.2
## Notes: Manage, save, restore, import and export action bar and keybind profiles
## Author: Phat phuck dave
## SavedVariables: ActionBarSaverDaved, KeybindSaverDaved

View File

@@ -39,13 +39,19 @@ local pickupActionButton = {
}
---@param index number
---@param actionButton {type: string, id: number|string}
---@return boolean, number?
local function RestoreActionButton(index, actionButton)
---@return nil
local function ClearActionButton(index)
if GetActionInfo(index) then
PickupAction(index)
ClearCursor()
end
end
---@param index number
---@param actionButton {type: string, id: number|string}
---@return boolean, number?
local function RestoreActionButton(index, actionButton)
ClearActionButton(index)
if not actionButton then return true, nil end
@@ -174,6 +180,7 @@ function RestoreActionbarSet(setName)
for i = 1, MAX_ACTION_BUTTONS do
local actionButton = set[i]
ClearActionButton(i)
if actionButton then
if IsMacro(actionButton) and duplicates[actionButton.id] then
---@cast actionButton {type: string, id: string}

View File

@@ -143,6 +143,12 @@ local function ImportKeybindSet(setName, importStr)
for _, line in ipairs(lines) do
local command, key, key2 = strsplit(":", line)
if command and key then
if string.find(command, "CLICK ") then
-- I can't believe we have to do this bullshit...
local tmp = key
key = key2
key2 = tmp
end
if not set[command] then set[command] = {
key1 = key,
key2 = key2,

2
Meta

Submodule Meta updated: 51a48175fa...48fc2ed99c