mirror of
https://forgejo.merr.is/annika/KittenDismount.git
synced 2025-12-11 12:22:08 -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": [
|
||||
"CreateFrame",
|
||||
"C_ChatInfo",
|
||||
"DEFAULT_CHAT_FRAME",
|
||||
"IsFlying",
|
||||
"Dismount",
|
||||
"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
|
||||
|
||||
Usage: go to Options->AddOns->Kitten Easy Dismount
|
||||
]] --
|
||||
]]--
|
||||
|
||||
KittenDismount = {
|
||||
DefaultSettings = {
|
||||
surgeForward = true,
|
||||
skywardAscent = false,
|
||||
whirlingSurge = true,
|
||||
arielHalt = true,
|
||||
aerialHalt = true,
|
||||
secondWind = false,
|
||||
Active = true,
|
||||
},
|
||||
|
|
@ -25,7 +26,7 @@ KittenDismount = {
|
|||
surgeForward = 372608,
|
||||
skywardAscent = 372610,
|
||||
whirlingSurge = 361584,
|
||||
aerielHalt = 403092,
|
||||
aerialHalt = 403092,
|
||||
secondWind = 425782,
|
||||
},
|
||||
}
|
||||
|
|
@ -47,6 +48,7 @@ end)
|
|||
local category = Settings.RegisterVerticalLayoutCategory("Kitten Easy Dismount")
|
||||
|
||||
-- Event Handlers
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:UNIT_SPELLCAST_SENT(...)
|
||||
local unit, target, castGUID, spellID = ...;
|
||||
if ((not IsFlying()) and KittenDismount.disabledSpells[spellID]) then
|
||||
|
|
@ -55,6 +57,7 @@ function KittenDismount:UNIT_SPELLCAST_SENT(...)
|
|||
end
|
||||
|
||||
-- Setup stuff
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:VARIABLES_LOADED()
|
||||
if (KittenDismountData.DataCode ~= self.DataCode) then
|
||||
self:SetDefaults()
|
||||
|
|
@ -64,7 +67,7 @@ function KittenDismount:VARIABLES_LOADED()
|
|||
surgeForward = KittenDismountData.surgeForward,
|
||||
skywardAscent = KittenDismountData.skywardAscent,
|
||||
whirlingSurge = KittenDismountData.whirlingSurge,
|
||||
arielHalt = KittenDismountData.arielHalt,
|
||||
aerialHalt = KittenDismountData.aerialHalt,
|
||||
secondWind = KittenDismountData.secondWind,
|
||||
}
|
||||
self:SetDismountArray()
|
||||
|
|
@ -74,7 +77,7 @@ function KittenDismount:VARIABLES_LOADED()
|
|||
local variableKey = "surgeForward"
|
||||
local defaultValue = Settings.Default.True
|
||||
local tooltip = "Automatically dismount when Surge Forward is cast while on the ground."
|
||||
|
||||
|
||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||
end
|
||||
do
|
||||
|
|
@ -83,7 +86,7 @@ function KittenDismount:VARIABLES_LOADED()
|
|||
local variableKey = "skywardAscent"
|
||||
local defaultValue = Settings.Default.False
|
||||
local tooltip = "Automatically dismount when Skyward Ascent is cast while on the ground."
|
||||
|
||||
|
||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||
end
|
||||
do
|
||||
|
|
@ -92,16 +95,16 @@ function KittenDismount:VARIABLES_LOADED()
|
|||
local variableKey = "whirlingSurge"
|
||||
local defaultValue = Settings.Default.True
|
||||
local tooltip = "Automatically dismount when Whirling Surge is cast while on the ground."
|
||||
|
||||
|
||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||
end
|
||||
do
|
||||
local name = "Aeriel Halt"
|
||||
local variable = "aerielHaltToggle"
|
||||
local variableKey = "aerielHalt"
|
||||
local name = "Aerial Halt"
|
||||
local variable = "aerialHaltToggle"
|
||||
local variableKey = "aerialHalt"
|
||||
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)
|
||||
end
|
||||
do
|
||||
|
|
@ -110,31 +113,34 @@ function KittenDismount:VARIABLES_LOADED()
|
|||
local variableKey = "secondWind"
|
||||
local defaultValue = Settings.Default.False
|
||||
local tooltip = "Automatically dismount when Second Wind is cast while on the ground."
|
||||
|
||||
|
||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||
end
|
||||
Settings.RegisterAddOnCategory(category)
|
||||
self:ActivateMod()
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:SaveSettings()
|
||||
KittenDismountData.DataCode = KittenDismount.DataCode
|
||||
KittenDismountData.Active = KittenDismount.Active
|
||||
KittenDismountData.surgeForward = KittenDismount.Settings.surgeForward
|
||||
KittenDismountData.skywardAscent = KittenDismount.Settings.skywardAscent
|
||||
KittenDismountData.whirlingSurge = KittenDismount.Settings.whirlingSurge
|
||||
KittenDismountData.arielHalt = KittenDismount.Settings.arielHalt
|
||||
KittenDismountData.aerialHalt = KittenDismount.Settings.aerialHalt
|
||||
KittenDismountData.secondWind = KittenDismount.Settings.secondWind
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:SetDefaults()
|
||||
KittenDismount.Active = KittenDismountData.Active
|
||||
KittenDismount.Settings.surgeForward = KittenDismount.DefaultSettings.surgeForward
|
||||
KittenDismount.Settings.skywardAscent = KittenDismount.DefaultSettings.skywardAscent
|
||||
KittenDismount.Settings.whirlingSurge = KittenDismount.DefaultSettings.whirlingSurge
|
||||
KittenDismount.Settings.arielHalt = KittenDismount.DefaultSettings.arielHalt
|
||||
KittenDismount.Settings.aerialHalt = KittenDismount.DefaultSettings.aerialHalt
|
||||
KittenDismount.Settings.secondWind = KittenDismount.DefaultSettings.secondWind
|
||||
self:SaveSettings()
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:ActivateMod()
|
||||
if (KittenDismount.Active) then
|
||||
kittenDismountFrame:RegisterEvent("UNIT_SPELLCAST_SENT")
|
||||
|
|
@ -147,6 +153,7 @@ end
|
|||
local function settingChanged(setting, value)
|
||||
KittenDismount:SetDismountArray()
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:SetDismountArray()
|
||||
local disabled = {}
|
||||
|
||||
|
|
@ -156,14 +163,17 @@ function KittenDismount:SetDismountArray()
|
|||
|
||||
self.disabledSpells = disabled
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:RegisterCheckbox(cat, variable, variableKey, name, defaultValue, tooltip)
|
||||
local setting = Settings.RegisterAddOnSetting(cat, variable, variableKey, KittenDismountData, Settings.VarType.Boolean, name, defaultValue)
|
||||
setting:SetValueChangedCallback(settingChanged)
|
||||
Settings.CreateCheckbox(cat, setting, tooltip)
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:Print(message)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] " .. tostring(message))
|
||||
end
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function KittenDismount:Error(message)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] |cff0000ff" .. tostring(message) .. "|r")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
## Interface: 110002
|
||||
## Version: 0.0.4
|
||||
## Interface: 110100
|
||||
## Version: 1.0.0
|
||||
## 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
|
||||
## X-Wago-ID: bGoM1p60
|
||||
## X-Curse-Project-ID: 1117964
|
||||
## X-WoWI-ID: 26858
|
||||
|
||||
## 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