Skip to content

Commit c5e0c23

Browse files
committed
Added keybind for Previous Pet
1 parent 1bc04df commit c5e0c23

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

PetWalker.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Interface: 100205
22
## Title: PetWalker
3-
## Version: 2.1.3
3+
## Version: 2.1.4
44
## IconTexture: Interface/AddOns/PetWalker/icon.png
55
## X-Flavor: Mainline
66
## Notes: Automatically re-summons your lost companion pet, or auto-summons a random or a favorite one.

bindings.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<Binding name="PETWALKER_NEW_PET" category="PetWalker ">
66
PetWalker_binding_new_pet()
77
</Binding>
8+
<Binding name="PETWALKER_PREVIOUS_PET" category="PetWalker ">
9+
PetWalker_binding_previous_pet()
10+
</Binding>
811
<Binding name="PETWALKER_TARGET_PET" category="PetWalker ">
912
PetWalker_binding_target_pet()
1013
</Binding>

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
#### 2.1.4 (2024-02-17)
2+
3+
- Added a keybinding for ‘Summon Previous Pet’
4+
- You can set it in Options > Game > Keybindings > PetWalker, along with the other 4 keybindings.
5+
- This does the same as the command `/pw p` (which still exists).
6+
- This function is more useful as you may think. A few tips:
7+
- If you're a Blacksmith or Engi, you probably have Alvin the Anvil on your action bar or OPie ring. Well, Alvin is useful, but, let's face it, a bit boring as a companion. So when you are done with your work, say thanks to Alvin and hit the Previous Pet key and you will have your previous companion back.
8+
- Press the key repeatedly to toggle between two pets. This allows you to have two temporary favorites (or "favorites of the day") without changing your Pet Journal favorites: Disable the autosummon timer (`/pw 0`), summon the first pet, and then the second pet. Now you can switch between them with a single keystroke.
9+
- ‘Previous Pet’ also works in conjunction with the autosummon timer, and it resets the timer. So if the timer summons a new pet, but you'd like to have the other one for a little longer, just press the Previous Pet key and you'll have it for another 30 minutes (or whatever your timer is set to).
10+
111
#### 2.1.3 (2024-01-16)
212

313
- Just a toc bump for 10.2.5. Compatibility update will follow if needed.

main.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ local excluded_species = {
8686
But it should be safe, bc CD starts only after activating the ability via dialog. ]]
8787
-- 214, -- Argent Squire (Alliance)
8888
-- 216, -- Argent Gruntling (Horde)
89-
--[[ Self-unspawns outside of Weinter Veil. Makes no sense summoning these. ]]
89+
--[[ Self-unspawns outside of Winter Veil. Makes no sense to summon these. ]]
9090
1349, -- Rotten Little Helper
9191
117, -- Tiny Snowman
9292
119, -- Father Winter's Helper
@@ -149,6 +149,7 @@ In the function below, we could also replace the whole throttle system with…
149149
<unregister events>; C_TimerAfter(<throttle>, <re-register events>)
150150
]]
151151

152+
--[[
152153
local function forbidden_or_throttled()
153154
-- if not not ns.db.autoEnabled then return true end
154155
-- Always-active throttle
@@ -186,7 +187,7 @@ local function forbidden_or_throttled()
186187
end
187188
return forbidden
188189
end
189-
190+
--]]
190191
--[[---------------------------------------------------------------------------
191192
END: WiP function
192193
---------------------------------------------------------------------------]]--
@@ -289,11 +290,13 @@ end
289290
-- BINDING_HEADER_PETWALKER = "PetWalker "
290291
BINDING_NAME_PETWALKER_TOGGLE_AUTO = 'Toggle Auto-Summoning'
291292
BINDING_NAME_PETWALKER_NEW_PET = 'Summon New Pet'
292-
BINDING_NAME_PETWALKER_TARGET_PET = 'Try to Summon Same Pet as Target'
293+
BINDING_NAME_PETWALKER_PREVIOUS_PET = 'Summon Previous Pet'
294+
BINDING_NAME_PETWALKER_TARGET_PET = 'Summon Same Pet as Target'
293295
BINDING_NAME_PETWALKER_DISMISS_PET = 'Dismiss Pet & Disable Auto-Summoning'
294296

295297
function PetWalker_binding_toggle_autosummon() ns:auto_toggle() end
296298
function PetWalker_binding_new_pet() ns:new_pet(nil, true) end
299+
function PetWalker_binding_previous_pet() ns.previous_pet() end
297300
function PetWalker_binding_target_pet() ns:summon_targetpet() end
298301
function PetWalker_binding_dismiss_and_disable() ns:dismiss_and_disable() end
299302

@@ -1133,7 +1136,7 @@ end
11331136

11341137
--[[ License ===================================================================
11351138
1136-
Copyright © 2022–2023 Thomas Floeren
1139+
Copyright © 2022–2024 Thomas Floeren
11371140
11381141
This file is part of PetWalker.
11391142

0 commit comments

Comments
 (0)