mirror of
https://github.com/ckaczor/TillerTracker.git
synced 2026-01-14 01:25:42 -05:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3007df9958 | |||
| 29e33f73a5 | |||
| cce4f893aa | |||
| 4c9f9eb9ec | |||
| 296c95b3a2 | |||
| 8ce33b2a2d |
@@ -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
|
||||
|
||||
@@ -326,14 +326,16 @@ end
|
||||
|
||||
local function Entry_OnMouseUp(frame, info, button)
|
||||
if button == "LeftButton" then
|
||||
if not _G.TomTom then
|
||||
return
|
||||
end
|
||||
|
||||
local m = TomTom:GetCurrentPlayerPosition()
|
||||
local location = info["LOCATION"]
|
||||
|
||||
_G.TomTom:AddWaypoint(m, 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
|
||||
|
||||
@@ -375,9 +377,25 @@ function TillerTracker:AllReputationsDone()
|
||||
return true
|
||||
end
|
||||
|
||||
function TillerTracker:GetAllCompletedQuestIDs()
|
||||
if C_QuestLog.GetAllCompletedQuestIDs then
|
||||
return C_QuestLog.GetAllCompletedQuestIDs()
|
||||
elseif GetQuestsCompleted then
|
||||
local completedQuestIds = {}
|
||||
|
||||
local questsCompleted = GetQuestsCompleted()
|
||||
|
||||
for quest_id in pairs(questsCompleted) do
|
||||
table.insert(completedQuestIds, quest_id)
|
||||
end
|
||||
|
||||
return completedQuestIds
|
||||
end
|
||||
end
|
||||
|
||||
function TillerTracker:UpdateData()
|
||||
-- Get information on all quests completed
|
||||
local questsCompleted = C_QuestLog.GetAllCompletedQuestIDs()
|
||||
local questsCompleted = TillerTracker:GetAllCompletedQuestIDs()
|
||||
|
||||
-- Create a table to store our current inventory of required mats
|
||||
local inv_table = {}
|
||||
@@ -583,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
|
||||
@@ -598,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
|
||||
@@ -698,7 +716,12 @@ function TillerTracker:ChatCommand(input)
|
||||
command = command:lower()
|
||||
|
||||
if command == L["config"]:lower() then
|
||||
InterfaceOptionsFrame_OpenToCategory(private.optionsFrame)
|
||||
if Settings then
|
||||
Settings.OpenToCategory("Tiller Tracker")
|
||||
elseif InterfaceOptionsFrame_OpenToCategory then
|
||||
InterfaceOptionsFrame_OpenToCategory("Tiller Tracker")
|
||||
InterfaceOptionsFrame_OpenToCategory("Tiller Tracker")
|
||||
end
|
||||
elseif command == L["minimap"]:lower() then
|
||||
private.db.global.minimap_icon.hide = not private.db.global.minimap_icon.hide
|
||||
TillerTracker:UpdateMinimapConfig()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## Interface: 110205
|
||||
## Title: Tiller Tracker
|
||||
## Version: 11.0.1
|
||||
## Version: 11.0.7
|
||||
## 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
|
||||
31
TillerTracker_Mists.toc
Normal file
31
TillerTracker_Mists.toc
Normal file
@@ -0,0 +1,31 @@
|
||||
## Interface: 50502
|
||||
## Title: Tiller Tracker
|
||||
## Version: 11.0.7
|
||||
## 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
|
||||
## OptionalDeps: Ace3, AceEvent-3.0, LibQTip-1.0, LibStub, AceTimer-3.0, AceConsole-3.0
|
||||
|
||||
#@no-lib-strip@
|
||||
Libs\LibStub\LibStub.lua
|
||||
Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
|
||||
Libs\AceAddon-3.0\AceAddon-3.0.xml
|
||||
Libs\AceConsole-3.0\AceConsole-3.0.xml
|
||||
Libs\AceEvent-3.0\AceEvent-3.0.xml
|
||||
Libs\AceLocale-3.0\AceLocale-3.0.xml
|
||||
Libs\AceTimer-3.0\AceTimer-3.0.xml
|
||||
Libs\AceDB-3.0\AceDB-3.0.xml
|
||||
Libs\AceGUI-3.0\AceGUI-3.0.xml
|
||||
Libs\AceConfig-3.0\AceConfig-3.0.xml
|
||||
Libs\LibQTip-1.0\lib.xml
|
||||
Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
|
||||
Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
|
||||
#@end-no-lib-strip@
|
||||
|
||||
Locale\enUS.lua
|
||||
Locale\frFR.lua
|
||||
Locale\deDE.lua
|
||||
|
||||
Data.lua
|
||||
Sort.lua
|
||||
TillerTracker.lua
|
||||
Reference in New Issue
Block a user