Add support for built-in waypoints if TomTom not installed

This commit is contained in:
2025-11-25 11:40:49 -05:00
parent cce4f893aa
commit 29e33f73a5
4 changed files with 17 additions and 14 deletions

View File

@@ -20,7 +20,7 @@ L["A Dish for Tina"] = true
L["|cFF00FF00Complete|r"] = true
L["|cFFFF0000Not Complete|r"] = true
L["|cFFFFFF00Click|r a quest in the tooltip to set a TomTom waypoint at the farmer's home"] = true
L["|cFFFFFF00Click|r a quest in the tooltip to set a waypoint at the farmer's home"] = true
L["|cFFFFFF00Click|r the main button to toggle whether the tooltip stays open"] = true
L["|cFFFFFF00Right Click|r the main button to cycle through which ingredient to track"] = true
L["|cFFFFFF00Ctrl-Click|r the main button to queue craftable foods in Skillet"] = true

View File

@@ -326,13 +326,16 @@ end
local function Entry_OnMouseUp(frame, info, button)
if button == "LeftButton" then
if not _G.TomTom then
return
end
local location = info["LOCATION"]
_G.TomTom:AddWaypoint(376, location[1] / 100, location[2] / 100, { title = info["NAME"] })
if _G.TomTom then
_G.TomTom:AddWaypoint(376, location[1] / 100, location[2] / 100, { title = info["NAME"] })
elseif C_Map.CanSetUserWaypointOnMap then
if C_Map.CanSetUserWaypointOnMap(376) then
local mapPoint = UiMapPoint.CreateFromCoordinates(376, location[1] / 100, location[2] / 100)
C_Map.SetUserWaypoint(mapPoint)
end
end
end
end
@@ -598,8 +601,8 @@ function TillerTracker:UpdateTooltip()
-- Add the line with info about the current quest
line = private.tooltip:AddLine(quest["NAME_DISPLAY"], quest["FOOD_DISPLAY"], quest["AMOUNT_DISPLAY"], quest["STATUS"], quest["NEED"])
-- If TomTom is installed then set the line script
if _G.TomTom then
-- Set the line script if TomTom is installed or the game supports waypoints
if C_Map.CanSetUserWaypointOnMap or _G.TomTom then
private.tooltip:SetLineScript(line, "OnMouseUp", Entry_OnMouseUp, { NAME = quest["NAME"], LOCATION = quest["LOCATION"] })
end
end
@@ -613,10 +616,10 @@ function TillerTracker:UpdateTooltip()
line = private.tooltip:AddLine()
private.tooltip:SetCell(line, 1, L["|cFFFFFF00Right Click|r the main button to cycle through which ingredient to track"], "LEFT", private.tooltip:GetColumnCount())
-- If TomTom is installed then add a hint to the end
if _G.TomTom then
-- Add a hint to the end if TomTom is installed or the game supports waypoints
if C_Map.CanSetUserWaypointOnMap or _G.TomTom then
line = private.tooltip:AddLine()
private.tooltip:SetCell(line, 1, L["|cFFFFFF00Click|r a quest in the tooltip to set a TomTom waypoint at the farmer's home"], "LEFT", private.tooltip:GetColumnCount())
private.tooltip:SetCell(line, 1, L["|cFFFFFF00Click|r a quest in the tooltip to set a waypoint at the farmer's home"], "LEFT", private.tooltip:GetColumnCount())
end
-- Add the Skillet hint if installed

View File

@@ -1,6 +1,6 @@
## Interface: 110205
## Title: Tiller Tracker
## Version: 11.0.5
## Version: 11.0.6
## Notes: Helps with the daily Tiller food quests ("A Dish for...") by keeping track of what quests have been completed that day, how many dishes need to be cooked, and what materials are required.
## Author: Amanoa
## SavedVariables: TillerTrackerDB

View File

@@ -1,6 +1,6 @@
## Interface: 50500
## Title: Tiller Tracker
## Version: 11.0.5
## Version: 11.0.6
## Notes: Helps with the daily Tiller food quests ("A Dish for...") by keeping track of what quests have been completed that day, how many dishes need to be cooked, and what materials are required.
## Author: Amanoa
## SavedVariables: TillerTrackerDB