Split out goliath addon for distribution #23
7 changed files with 74 additions and 34 deletions
|
@ -1 +1,3 @@
|
|||
export WOW_ADDON_DIR=
|
||||
export CURSEFORGE_TOKEN=
|
||||
export CURSEFORGE_PROJECT_ID=
|
||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.zip
|
35
ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua
Normal file
35
ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local f = CreateFrame("Frame")
|
||||
|
||||
StaticPopupDialogs["GOLIATH_MISSING"] = {
|
||||
text = "Option to repair goliath not found; move closer",
|
||||
button1 = "Ok",
|
||||
OnAccept = function()
|
||||
C_GossipInfo.CloseGossip()
|
||||
end,
|
||||
timeout = 5,
|
||||
whileDead = false,
|
||||
hideOnEscape = true,
|
||||
preferredIndex = 3
|
||||
}
|
||||
|
||||
f:RegisterEvent("GOSSIP_SHOW")
|
||||
|
||||
f:SetScript("OnEvent", function(self, event, ...)
|
||||
local isNecroticWake = GetZoneText() == "The Necrotic Wake"
|
||||
local isSteward = GetUnitName("npc") == "Steward"
|
||||
|
||||
if isNecroticWake and isSteward then
|
||||
options = C_GossipInfo.GetOptions()
|
||||
|
||||
found = false
|
||||
for k, v in pairs(options) do
|
||||
if v['name'] == 'Can you reactivate this goliath?' then
|
||||
found = true
|
||||
C_GossipInfo.SelectOption(k)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not found then StaticPopup_Show("GOLIATH_MISSING") end
|
||||
end
|
||||
end)
|
6
ATAutoReactivateGoliath/ATAutoReactivateGoliath.toc
Normal file
6
ATAutoReactivateGoliath/ATAutoReactivateGoliath.toc
Normal file
|
@ -0,0 +1,6 @@
|
|||
## Interface: 90005
|
||||
## Title: ATReactivateGoliath
|
||||
## Author: Andrew Tomaka
|
||||
## Version: 1.0
|
||||
|
||||
ATAutoReactivateGoliath.lua
|
|
@ -9,18 +9,6 @@ StaticPopupDialogs["REPAIR_ALERT"] = {
|
|||
preferredIndex = 3
|
||||
}
|
||||
|
||||
StaticPopupDialogs["GOLIATH_MISSING"] = {
|
||||
text = "Option to repair goliath not found; move closer",
|
||||
button1 = "Ok",
|
||||
OnAccept = function()
|
||||
C_GossipInfo.CloseGossip()
|
||||
end,
|
||||
timeout = 5,
|
||||
whileDead = false,
|
||||
hideOnEscape = true,
|
||||
preferredIndex = 3
|
||||
}
|
||||
|
||||
SLASH_ATME1 = "/ta"
|
||||
|
||||
ATMe.keyItemID = 180653
|
||||
|
@ -84,13 +72,6 @@ function events:INSPECT_READY(guid)
|
|||
end
|
||||
end
|
||||
|
||||
function events:GOSSIP_SHOW()
|
||||
local isNecroticWake = GetZoneText() == 'The Necrotic Wake'
|
||||
local isSteward = GetUnitName('npc') == 'Steward'
|
||||
|
||||
if isNecroticWake and isSteward then ATMe.activateGoliath() end
|
||||
end
|
||||
|
||||
function events:CHAT_MSG_PARTY_LEADER(message, ...)
|
||||
if message == '!keys' then
|
||||
ATMe.announceKey()
|
||||
|
@ -213,21 +194,6 @@ function ATMe.announceTaunts(...)
|
|||
print(message)
|
||||
end
|
||||
|
||||
function ATMe.activateGoliath()
|
||||
options = C_GossipInfo.GetOptions()
|
||||
|
||||
found = false
|
||||
for k, v in pairs(options) do
|
||||
if v['name'] == 'Can you reactivate this goliath?' then
|
||||
found = true
|
||||
C_GossipInfo.SelectOption(k)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not found then StaticPopup_Show("GOLIATH_MISSING") end
|
||||
end
|
||||
|
||||
function ATMe.needsRepair()
|
||||
for slot = 1, #ATMe.slots do
|
||||
local id = GetInventorySlotInfo(ATMe.slots[slot])
|
||||
|
|
20
Makefile
20
Makefile
|
@ -1,5 +1,25 @@
|
|||
install:
|
||||
cp -r ATMe/ $$WOW_ADDON_DIR
|
||||
cp -r ATAutoReactivateGoliath/ $$WOW_ADDON_DIR
|
||||
|
||||
update:
|
||||
cp -r $$WOW_ADDON_DIR/ATMe .
|
||||
cp -r $$WOW_ADDON_DIR/ATAutoReactivateGoliath .
|
||||
|
||||
clean:
|
||||
rm -f ATAutoReactivateGoliath.zip
|
||||
|
||||
archive: clean
|
||||
zip -r ATAutoReactivateGoliath ATAutoReactivateGoliath
|
||||
|
||||
upload: archive
|
||||
test $$WOW_GAME_VERSION
|
||||
curl -H "X-Api-Token: $$CURSEFORGE_TOKEN" \
|
||||
-F metadata='{changelog: "Initial upload", gameVersions: [$$WOW_GAME_VERSION], releaseType: "release"}' \
|
||||
-F file=@ATAutoReactivateGoliath.zip \
|
||||
https://wow.curseforge.com/api/projects/$$CURSEFORGE_PROJECT_ID/upload-file
|
||||
|
||||
version:
|
||||
@curl -s -H "X-Api-Token: $$CURSEFORGE_TOKEN" \
|
||||
https://wow.curseforge.com/api/game/versions | \
|
||||
jq ".[-1] | .id"
|
||||
|
|
10
README.md
Normal file
10
README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# ATAddons
|
||||
|
||||
Miscellaneous World of Warcraft addons.
|
||||
|
||||
## ATAutoReactivateGoliath
|
||||
|
||||
To distribute new file via Makefile
|
||||
|
||||
1. `WOW_GAME_VERSION=$(make version)` to grab the current game version
|
||||
2. `make upload` to upload addon for recently grabbed game version
|
Loading…
Reference in a new issue