Skip to content

Commit

Permalink
feat(pets): added pet assignment [gh#134](#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
exochron committed Dec 1, 2024
1 parent e819f2a commit fbf80fd
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 3 deletions.
11 changes: 11 additions & 0 deletions Locals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ L["Hidden"] = "Hidden"
L["Only tradable"] = "Only tradable"
L["Only usable"] = "Only usable"
L["Passenger"] = "Passenger"
L["PET_ASSIGNMENT_TITLE"] = "Assign Pet to Mount"
L["PET_ASSIGNMENT_NONE"] = "No Pet"
L["PET_ASSIGNMENT_TOOLTIP_CURRENT"] = "Current assigned Pet:"
L["PET_ASSIGNMENT_TOOLTIP_LEFT"] = "|cffeda55fLeft click|r to open pet assignment."
L["PET_ASSIGNMENT_TOOLTIP_RIGHT"] = "|cffeda55fRight click|r to assign active pet to mount."
L["PET_ASSIGNMENT_INFO"] = "You can assign a pet to this mount. It's going to be summoned as well, when you mount up.|n|n"
.. "All assignments are shared with all your characters.|n|n"
.. "You can use right-click on a pet entry to summon it manually.|n|n"
.. "Please be aware that most ground pets won't fly with you and just disappear when you take off. Also, flying pets are usually slower than you. So they might need some time to catch up to you.|n|n"
.. "Auto summoning pets is only active in world content."
L["ROTATE_DOWN"] = "Rotate Down"
L["ROTATE_UP"] = "Rotate Up"
L["Reset filters"] = "Reset filters"
Expand Down Expand Up @@ -270,6 +280,7 @@ L["SETTING_SEARCH_FAMILY_NAME"] = "Search also by family name"
L["SETTING_SEARCH_NOTES"] = "Search also in own notes"
L["SETTING_SHOW_RESIZE_EDGE"] = "Activate edge in bottom corner to resize window"
L["SETTING_SHOW_DATA"] = "Show mount data in display"
L["SETTING_SUMMONPREVIOUSPET"] = "Summon previous active pet again when dismounting."
L["SETTING_TRACK_USAGE"] = "Track mount usage behavior on all characters"
L["SETTING_YCAMERA"] = "Unlock Y rotation with mouse in display"

Expand Down
1 change: 1 addition & 0 deletions MountJournalEnhanced.toc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ UI\DisplayStatistics.lua
UI\Hotkeys.lua
UI\MountListDropDown.lua
UI\MountSpecialButton.lua
UI\PetAssignment.lua
UI\SettingsDropDown.lua
UI\DressUpButton.lua
UI\RarityNames.lua
Expand Down
1 change: 1 addition & 0 deletions MountJournalEnhanced_Cata.toc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ UI\DisplayStatistics.lua
UI\Hotkeys.lua
UI\MountListDropDown.lua
UI\MountSpecialButton.lua
UI\PetAssignment.lua
UI\SettingsDropDown.lua
# UI\DressUpButton.lua # no mount preview possible yet
UI\SummonRandomButton.lua
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ This addon extends the ingame mount journal with some cool stuff.
- Sort mounts by: name, family, type, expansion, rarity or your mount usage statistics. (or all of it in reverse)

## ⭐ Enhanced Favorites
- __new:__ Use multiple Profiles and quickly switch between them
- Use multiple Profiles and quickly switch between them
- Integrated Data broker plugin to access your favorite mounts more quickly
- Favor all filtered mounts at once or unset them all
- Favor new mounts automatically
- readds Summon Random Mount Button for Cataclysm Classic

## ⚙️ Enhanced Interface
- __new:__ Assign pets to your mounts. They will be summoned as well, when you mount up.
- [Display] Sync the journal with your current target. (Great for mount mania. ;))
- [Display] Shows direct link to Wowhead
- [Display] Freely rotate display camera around mount
Expand Down
8 changes: 8 additions & 0 deletions Settings/Settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ local function PrepareDefaults()
searchInDescription = true,
searchInFamilyName = true,
searchInNotes = true,
summonPreviousPetAgain = true,

personalUi = false,
ui = {
Expand Down Expand Up @@ -120,6 +121,11 @@ local function PrepareDefaults()
mounts = {},
}
},
},

pets = {
seenInfo = false,
assignments = {},
}
}
for categoryName, _ in pairs(ADDON.DB.Source) do
Expand Down Expand Up @@ -206,8 +212,10 @@ ADDON.Events:RegisterCallback("OnInit", function()
ADDON:ApplySetting('searchInDescription', MJEPersonalSettings.searchInDescription)
ADDON:ApplySetting('searchInFamilyName', MJEPersonalSettings.searchInFamilyName)
ADDON:ApplySetting('searchInNotes', MJEPersonalSettings.searchInNotes)
ADDON:ApplySetting('summonPreviousPetAgain', MJEPersonalSettings.summonPreviousPetAgain)

ADDON.settings.trackUsageStats = MJEGlobalSettings.trackUsageStats
ADDON.settings.notes = MJEGlobalSettings.notes
ADDON.settings.favorites = MJEGlobalSettings.favorites
ADDON.settings.pets = MJEGlobalSettings.pets
end, "settings init")
4 changes: 2 additions & 2 deletions UI/EnhancedToolbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ local function renderToolbar()
group[#group]:ClearAllPoints()

if lastButton then
group[#group]:SetPoint("RIGHT", lastButton, "LEFT", -20, 0)
group[#group]:SetPoint("RIGHT", lastButton, "LEFT", -13, 0)
else
group[#group]:SetPoint("CENTER", MountJournal, "TOPRIGHT", -24, -42)
end

for i = #group-1, 1, -1 do
group[i]:ClearAllPoints()
group[i]:SetPoint("RIGHT", group[i+1], "LEFT", -6, 0)
group[i]:SetPoint("RIGHT", group[i+1], "LEFT", -3, 0)
end

lastButton = group[1]
Expand Down
Loading

0 comments on commit fbf80fd

Please sign in to comment.