mirror of
https://forgejo.merr.is/annika/KittenDismount.git
synced 2025-12-10 12:08:46 -05:00
Remove Accidentally Added Files and Updated README.md
This commit is contained in:
parent
2e8859e454
commit
c19f802d25
5 changed files with 2 additions and 192 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -1,169 +0,0 @@
|
|||
-------------------------------------------------------------------------------
|
||||
-- KittenDismount.lua
|
||||
-------------------------------------------------------------------------------
|
||||
--[[
|
||||
KittenDismount
|
||||
Author: Anisa of Scarlet Crusade
|
||||
|
||||
Usage: go to Options->AddOns->Kitten Easy Dismount
|
||||
]] --
|
||||
KittenDismount = {
|
||||
DefaultSettings = {
|
||||
surgeForward = true,
|
||||
skywardAscent = false,
|
||||
whirlingSurge = true,
|
||||
arielHalt = true,
|
||||
secondWind = false,
|
||||
Active = true,
|
||||
},
|
||||
Version = "0.0.3",
|
||||
VersionNumber = 3,
|
||||
DataCode = "2",
|
||||
Settings = {},
|
||||
Active = true,
|
||||
Spells = {
|
||||
surgeForward = 372608,
|
||||
skywardAscent = 372610,
|
||||
whirlingSurge = 361584,
|
||||
aerielHalt = 403092,
|
||||
secondWind = 425782,
|
||||
},
|
||||
}
|
||||
KittenDismountData = {}
|
||||
KittenDismount.__index = KittenDismount
|
||||
KittenDismount.disabledSpells = {}
|
||||
|
||||
|
||||
-- Initialize the addon frame
|
||||
local kittenDismountFrame = CreateFrame("Frame", "KittenDismount")
|
||||
-- These are the event(s) that we listen for
|
||||
kittenDismountFrame:RegisterEvent("VARIABLES_LOADED")
|
||||
-- Function to "automatically" call the correct even function without having to have a gigantic block of if statements.
|
||||
kittenDismountFrame:SetScript("OnEvent", function(this, event, ...)
|
||||
KittenDismount[event](KittenDismount, ...)
|
||||
end)
|
||||
|
||||
-- Set up some other bits
|
||||
local category = Settings.RegisterVerticalLayoutCategory("Kitten Easy Dismount")
|
||||
|
||||
-- Event Handlers
|
||||
function KittenDismount:UNIT_SPELLCAST_SENT(...)
|
||||
local unit, target, castGUID, spellID = ...;
|
||||
if ((not IsFlying()) and KittenDismount.disabledSpells[spellID]) then
|
||||
Dismount()
|
||||
end
|
||||
end
|
||||
|
||||
-- Setup stuff
|
||||
function KittenDismount:VARIABLES_LOADED()
|
||||
if (KittenDismountData.DataCode ~= self.DataCode) then
|
||||
self:SetDefaults()
|
||||
self:Print("New settings format detected, settings have been reset to default")
|
||||
end
|
||||
self.Settings = {
|
||||
surgeForward = KittenDismountData.surgeForward,
|
||||
skywardAscent = KittenDismountData.skywardAscent,
|
||||
whirlingSurge = KittenDismountData.whirlingSurge,
|
||||
arielHalt = KittenDismountData.arielHalt,
|
||||
secondWind = KittenDismountData.secondWind,
|
||||
}
|
||||
self:SetDismountArray()
|
||||
do
|
||||
local name = "Surge Forward"
|
||||
local variable = "surgeForwardToggle"
|
||||
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
|
||||
local name = "Skyward Ascent"
|
||||
local variable = "skywardAscentToggle"
|
||||
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
|
||||
local name = "Whirling Surge"
|
||||
local variable = "whirlingSurgeToggle"
|
||||
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 defaultValue = Settings.Default.True
|
||||
local tooltip = "Automatically dismount when Aeriel Halt is cast while on the ground."
|
||||
|
||||
self:RegisterCheckbox(category, variable, variableKey, name, defaultValue, tooltip)
|
||||
end
|
||||
do
|
||||
local name = "Second Wind"
|
||||
local variable = "secondWindToggle"
|
||||
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
|
||||
|
||||
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.secondWind = KittenDismount.Settings.secondWind
|
||||
end
|
||||
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.secondWind = KittenDismount.DefaultSettings.secondWind
|
||||
self:SaveSettings()
|
||||
end
|
||||
function KittenDismount:ActivateMod()
|
||||
if (KittenDismount.Active) then
|
||||
kittenDismountFrame:RegisterEvent("UNIT_SPELLCAST_SENT")
|
||||
else
|
||||
kittenDismountFrame:UnregisterEvent("UNIT_SPELLCAST_SENT")
|
||||
end
|
||||
end
|
||||
|
||||
-- Other misc functions
|
||||
local function settingChanged(setting, value)
|
||||
KittenDismount:SetDismountArray()
|
||||
end
|
||||
function KittenDismount:SetDismountArray()
|
||||
local disabled = {}
|
||||
|
||||
for key, value in pairs(KittenDismount.Spells) do
|
||||
disabled[value] = KittenDismountData[key]
|
||||
end
|
||||
|
||||
self.disabledSpells = disabled
|
||||
end
|
||||
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
|
||||
function KittenDismount:Print(message)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] " .. tostring(message))
|
||||
end
|
||||
function KittenDismount:Error(message)
|
||||
DEFAULT_CHAT_FRAME:AddMessage("[|c44ff44ffKittenDismount|r] |cff0000ff" .. tostring(message) .. "|r")
|
||||
end
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
## Interface: 110002
|
||||
## Version: 0.0.4
|
||||
## Title: Kitten Easy Dismount
|
||||
## Notes: Quick addon to dismount if you are on a flying mount, but on the ground.
|
||||
## Author: Annika
|
||||
|
||||
## SavedVariables: KittenDismountData
|
||||
|
||||
KittenDismount.lua
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 annika
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# KittenDismount
|
||||
|
||||
Addon to dismount from Skyriding mounts if you are on the ground and activate skyriding abilities.
|
||||
Loading…
Add table
Add a link
Reference in a new issue