mirror of
https://forgejo.merr.is/annika/KittenDismount.git
synced 2025-12-13 06:52:12 -05:00
Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c27a2d48bd | |||
| f992b8abcb | |||
| a61520309b | |||
| b661f3c279 | |||
| 7f344f12c1 | |||
| af98bd3bfa | |||
| cc993de771 | |||
| 25cf687848 | |||
| bff88f8600 | |||
| a76e5c85c6 | |||
| 95305ad4ee | |||
| cab41912f8 | |||
| a66d069035 | |||
| f756ad9a1e | |||
| 94a5a6d3db | |||
| c19f802d25 | |||
| 2e8859e454 | |||
| 3e9a793ef5 |
7 changed files with 69 additions and 38 deletions
21
.github/workflows/create-release.yaml
vendored
Normal file
21
.github/workflows/create-release.yaml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
name: Create a release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
WAGO_API_TOKEN: ${{ secrets.WAGO_API_TOKEN }}
|
||||||
|
CF_API_KEY: ${{ secrets.CURSEFORGE_API_TOKEN }}
|
||||||
|
GITHUB_OAUTH: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Clone project
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Package and release
|
||||||
|
uses: BigWigsMods/packager@v2
|
||||||
19
.vscode/settings.json
vendored
19
.vscode/settings.json
vendored
|
|
@ -1,10 +1,21 @@
|
||||||
{
|
{
|
||||||
"Lua.diagnostics.globals": [
|
"Lua.diagnostics.globals": [
|
||||||
"CreateFrame",
|
|
||||||
"C_ChatInfo",
|
|
||||||
"DEFAULT_CHAT_FRAME",
|
"DEFAULT_CHAT_FRAME",
|
||||||
"IsFlying",
|
|
||||||
"Dismount",
|
|
||||||
"Settings"
|
"Settings"
|
||||||
|
],
|
||||||
|
"Lua.runtime.version": "Lua 5.1",
|
||||||
|
"Lua.runtime.builtin": {
|
||||||
|
"basic": "disable",
|
||||||
|
"debug": "disable",
|
||||||
|
"io": "disable",
|
||||||
|
"math": "disable",
|
||||||
|
"os": "disable",
|
||||||
|
"package": "disable",
|
||||||
|
"string": "disable",
|
||||||
|
"table": "disable",
|
||||||
|
"utf8": "disable"
|
||||||
|
},
|
||||||
|
"Lua.workspace.library": [
|
||||||
|
"~/.vscode/extensions/ketho.wow-api/Annotations"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -6,13 +6,14 @@ KittenDismount
|
||||||
Author: Anisa of Scarlet Crusade
|
Author: Anisa of Scarlet Crusade
|
||||||
|
|
||||||
Usage: go to Options->AddOns->Kitten Easy Dismount
|
Usage: go to Options->AddOns->Kitten Easy Dismount
|
||||||
]] --
|
]]--
|
||||||
|
|
||||||
KittenDismount = {
|
KittenDismount = {
|
||||||
DefaultSettings = {
|
DefaultSettings = {
|
||||||
surgeForward = true,
|
surgeForward = true,
|
||||||
skywardAscent = false,
|
skywardAscent = false,
|
||||||
whirlingSurge = true,
|
whirlingSurge = true,
|
||||||
arielHalt = true,
|
aerialHalt = true,
|
||||||
secondWind = false,
|
secondWind = false,
|
||||||
Active = true,
|
Active = true,
|
||||||
},
|
},
|
||||||
|
|
@ -25,7 +26,7 @@ KittenDismount = {
|
||||||
surgeForward = 372608,
|
surgeForward = 372608,
|
||||||
skywardAscent = 372610,
|
skywardAscent = 372610,
|
||||||
whirlingSurge = 361584,
|
whirlingSurge = 361584,
|
||||||
aerielHalt = 403092,
|
aerialHalt = 403092,
|
||||||
secondWind = 425782,
|
secondWind = 425782,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -47,6 +48,7 @@ end)
|
||||||
local category = Settings.RegisterVerticalLayoutCategory("Kitten Easy Dismount")
|
local category = Settings.RegisterVerticalLayoutCategory("Kitten Easy Dismount")
|
||||||
|
|
||||||
-- Event Handlers
|
-- Event Handlers
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:UNIT_SPELLCAST_SENT(...)
|
function KittenDismount:UNIT_SPELLCAST_SENT(...)
|
||||||
local unit, target, castGUID, spellID = ...;
|
local unit, target, castGUID, spellID = ...;
|
||||||
if ((not IsFlying()) and KittenDismount.disabledSpells[spellID]) then
|
if ((not IsFlying()) and KittenDismount.disabledSpells[spellID]) then
|
||||||
|
|
@ -55,6 +57,7 @@ function KittenDismount:UNIT_SPELLCAST_SENT(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Setup stuff
|
-- Setup stuff
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:VARIABLES_LOADED()
|
function KittenDismount:VARIABLES_LOADED()
|
||||||
if (KittenDismountData.DataCode ~= self.DataCode) then
|
if (KittenDismountData.DataCode ~= self.DataCode) then
|
||||||
self:SetDefaults()
|
self:SetDefaults()
|
||||||
|
|
@ -64,7 +67,7 @@ function KittenDismount:VARIABLES_LOADED()
|
||||||
surgeForward = KittenDismountData.surgeForward,
|
surgeForward = KittenDismountData.surgeForward,
|
||||||
skywardAscent = KittenDismountData.skywardAscent,
|
skywardAscent = KittenDismountData.skywardAscent,
|
||||||
whirlingSurge = KittenDismountData.whirlingSurge,
|
whirlingSurge = KittenDismountData.whirlingSurge,
|
||||||
arielHalt = KittenDismountData.arielHalt,
|
aerialHalt = KittenDismountData.aerialHalt,
|
||||||
secondWind = KittenDismountData.secondWind,
|
secondWind = KittenDismountData.secondWind,
|
||||||
}
|
}
|
||||||
self:SetDismountArray()
|
self:SetDismountArray()
|
||||||
|
|
@ -74,7 +77,7 @@ function KittenDismount:VARIABLES_LOADED()
|
||||||
local variableKey = "surgeForward"
|
local variableKey = "surgeForward"
|
||||||
local defaultValue = Settings.Default.True
|
local defaultValue = Settings.Default.True
|
||||||
local tooltip = "Automatically dismount when Surge Forward is cast while on the ground."
|
local tooltip = "Automatically dismount when Surge Forward is cast while on the ground."
|
||||||
|
|
||||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
|
|
@ -83,7 +86,7 @@ function KittenDismount:VARIABLES_LOADED()
|
||||||
local variableKey = "skywardAscent"
|
local variableKey = "skywardAscent"
|
||||||
local defaultValue = Settings.Default.False
|
local defaultValue = Settings.Default.False
|
||||||
local tooltip = "Automatically dismount when Skyward Ascent is cast while on the ground."
|
local tooltip = "Automatically dismount when Skyward Ascent is cast while on the ground."
|
||||||
|
|
||||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
|
|
@ -92,16 +95,16 @@ function KittenDismount:VARIABLES_LOADED()
|
||||||
local variableKey = "whirlingSurge"
|
local variableKey = "whirlingSurge"
|
||||||
local defaultValue = Settings.Default.True
|
local defaultValue = Settings.Default.True
|
||||||
local tooltip = "Automatically dismount when Whirling Surge is cast while on the ground."
|
local tooltip = "Automatically dismount when Whirling Surge is cast while on the ground."
|
||||||
|
|
||||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local name = "Aeriel Halt"
|
local name = "Aerial Halt"
|
||||||
local variable = "aerielHaltToggle"
|
local variable = "aerialHaltToggle"
|
||||||
local variableKey = "aerielHalt"
|
local variableKey = "aerialHalt"
|
||||||
local defaultValue = Settings.Default.True
|
local defaultValue = Settings.Default.True
|
||||||
local tooltip = "Automatically dismount when Aeriel Halt is cast while on the ground."
|
local tooltip = "Automatically dismount when Aerial Halt is cast while on the ground."
|
||||||
|
|
||||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
|
|
@ -110,31 +113,34 @@ function KittenDismount:VARIABLES_LOADED()
|
||||||
local variableKey = "secondWind"
|
local variableKey = "secondWind"
|
||||||
local defaultValue = Settings.Default.False
|
local defaultValue = Settings.Default.False
|
||||||
local tooltip = "Automatically dismount when Second Wind is cast while on the ground."
|
local tooltip = "Automatically dismount when Second Wind is cast while on the ground."
|
||||||
|
|
||||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||||
end
|
end
|
||||||
Settings.RegisterAddOnCategory(category)
|
Settings.RegisterAddOnCategory(category)
|
||||||
self:ActivateMod()
|
self:ActivateMod()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:SaveSettings()
|
function KittenDismount:SaveSettings()
|
||||||
KittenDismountData.DataCode = KittenDismount.DataCode
|
KittenDismountData.DataCode = KittenDismount.DataCode
|
||||||
KittenDismountData.Active = KittenDismount.Active
|
KittenDismountData.Active = KittenDismount.Active
|
||||||
KittenDismountData.surgeForward = KittenDismount.Settings.surgeForward
|
KittenDismountData.surgeForward = KittenDismount.Settings.surgeForward
|
||||||
KittenDismountData.skywardAscent = KittenDismount.Settings.skywardAscent
|
KittenDismountData.skywardAscent = KittenDismount.Settings.skywardAscent
|
||||||
KittenDismountData.whirlingSurge = KittenDismount.Settings.whirlingSurge
|
KittenDismountData.whirlingSurge = KittenDismount.Settings.whirlingSurge
|
||||||
KittenDismountData.arielHalt = KittenDismount.Settings.arielHalt
|
KittenDismountData.aerialHalt = KittenDismount.Settings.aerialHalt
|
||||||
KittenDismountData.secondWind = KittenDismount.Settings.secondWind
|
KittenDismountData.secondWind = KittenDismount.Settings.secondWind
|
||||||
end
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:SetDefaults()
|
function KittenDismount:SetDefaults()
|
||||||
KittenDismount.Active = KittenDismountData.Active
|
KittenDismount.Active = KittenDismountData.Active
|
||||||
KittenDismount.Settings.surgeForward = KittenDismount.DefaultSettings.surgeForward
|
KittenDismount.Settings.surgeForward = KittenDismount.DefaultSettings.surgeForward
|
||||||
KittenDismount.Settings.skywardAscent = KittenDismount.DefaultSettings.skywardAscent
|
KittenDismount.Settings.skywardAscent = KittenDismount.DefaultSettings.skywardAscent
|
||||||
KittenDismount.Settings.whirlingSurge = KittenDismount.DefaultSettings.whirlingSurge
|
KittenDismount.Settings.whirlingSurge = KittenDismount.DefaultSettings.whirlingSurge
|
||||||
KittenDismount.Settings.arielHalt = KittenDismount.DefaultSettings.arielHalt
|
KittenDismount.Settings.aerialHalt = KittenDismount.DefaultSettings.aerialHalt
|
||||||
KittenDismount.Settings.secondWind = KittenDismount.DefaultSettings.secondWind
|
KittenDismount.Settings.secondWind = KittenDismount.DefaultSettings.secondWind
|
||||||
self:SaveSettings()
|
self:SaveSettings()
|
||||||
end
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:ActivateMod()
|
function KittenDismount:ActivateMod()
|
||||||
if (KittenDismount.Active) then
|
if (KittenDismount.Active) then
|
||||||
kittenDismountFrame:RegisterEvent("UNIT_SPELLCAST_SENT")
|
kittenDismountFrame:RegisterEvent("UNIT_SPELLCAST_SENT")
|
||||||
|
|
@ -147,6 +153,7 @@ end
|
||||||
local function settingChanged(setting, value)
|
local function settingChanged(setting, value)
|
||||||
KittenDismount:SetDismountArray()
|
KittenDismount:SetDismountArray()
|
||||||
end
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:SetDismountArray()
|
function KittenDismount:SetDismountArray()
|
||||||
local disabled = {}
|
local disabled = {}
|
||||||
|
|
||||||
|
|
@ -156,14 +163,17 @@ function KittenDismount:SetDismountArray()
|
||||||
|
|
||||||
self.disabledSpells = disabled
|
self.disabledSpells = disabled
|
||||||
end
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:RegisterCheckbox(cat, variable, variableKey, name, defaultValue, tooltip)
|
function KittenDismount:RegisterCheckbox(cat, variable, variableKey, name, defaultValue, tooltip)
|
||||||
local setting = Settings.RegisterAddOnSetting(cat, variable, variableKey, KittenDismountData, Settings.VarType.Boolean, name, defaultValue)
|
local setting = Settings.RegisterAddOnSetting(cat, variable, variableKey, KittenDismountData, Settings.VarType.Boolean, name, defaultValue)
|
||||||
setting:SetValueChangedCallback(settingChanged)
|
setting:SetValueChangedCallback(settingChanged)
|
||||||
Settings.CreateCheckbox(cat, setting, tooltip)
|
Settings.CreateCheckbox(cat, setting, tooltip)
|
||||||
end
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:Print(message)
|
function KittenDismount:Print(message)
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] " .. tostring(message))
|
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] " .. tostring(message))
|
||||||
end
|
end
|
||||||
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function KittenDismount:Error(message)
|
function KittenDismount:Error(message)
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] |cff0000ff" .. tostring(message) .. "|r")
|
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] |cff0000ff" .. tostring(message) .. "|r")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
## Interface: 110002
|
## Interface: 110100
|
||||||
## Version: 0.0.4
|
## Version: 1.0.0
|
||||||
## Title: Kitten Easy Dismount
|
## Title: Kitten Easy Dismount
|
||||||
## Notes: Quick addon to dismount if you are on a flying mount, but on the ground.
|
## Notes: Quick addon to dismount if you are on a skyriding mount, but on the ground.
|
||||||
## Author: Annika
|
## Author: Annika
|
||||||
|
## X-Wago-ID: bGoM1p60
|
||||||
|
## X-Curse-Project-ID: 1117964
|
||||||
|
## X-WoWI-ID: 26858
|
||||||
|
|
||||||
## SavedVariables: KittenDismountData
|
## SavedVariables: KittenDismountData
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# KittenDismount
|
# Kitten Easy Dismount
|
||||||
|
|
||||||
Addon to dismount from Skyriding mounts if you are on the ground and activate skyriding abilities.
|
Addon to dismount from Skyriding mounts if you are on the ground and activate skyriding abilities.
|
||||||
|
|
|
||||||
14
dump.lua
14
dump.lua
|
|
@ -1,14 +0,0 @@
|
||||||
function KittenDismount_dump(o)
|
|
||||||
if type(o) == 'table' then
|
|
||||||
local s = '{ '
|
|
||||||
for k,v in pairs(o) do
|
|
||||||
if type(k) ~= 'number' then
|
|
||||||
k = '"'..k..'"'
|
|
||||||
end
|
|
||||||
s = s .. '['..k..'] = ' .. KittenDismount_dump(v) .. ','
|
|
||||||
end
|
|
||||||
return s .. '} '
|
|
||||||
else
|
|
||||||
return tostring(o)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
BIN
icon.jpg
Normal file
BIN
icon.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
Loading…
Add table
Add a link
Reference in a new issue