Quantcast

* Fixed a lua error that occured when setting a waypoint

James Whitehead Ii [05-22-07 - 23:16]
* Fixed a lua error that occured when setting a waypoint
* TomTom now announces the label you've given a waypoint, if it exists.
Filename
TomTom.lua
diff --git a/TomTom.lua b/TomTom.lua
index 9b0c834..856146e 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -266,11 +266,11 @@ local function MinimapIcon_OnUpdate(self, elapsed)
 		self.arrow:Show()
 		self.arrow.seqtime = 0
 		self.dot:Hide()
-		icon.edge = true
+		self.edge = true
 	elseif not edge and not dot then
 		self.dot:Show()
 		self.arrow:Hide()
-		icon.edge = false
+		self.edge = false
 	end

 	local dist,x,y = Astrolabe:GetDistanceToIcon(self)
@@ -279,7 +279,9 @@ local function MinimapIcon_OnUpdate(self, elapsed)
 		Astrolabe:RemoveIconFromMinimap(self)
 		self.pair:Hide()
 		table.insert(TomTom.worldmapIcons, self.pair)
-		TomTom:PrintF("You have arrived at your location (%s)", self.coord)
+		local msg = (self.label and self.label ~= "") and self.label or "your destination"
+
+		TomTom:PrintF("You have arrived at %s (%s)", msg, self.coord)

 		for idx,entry in ipairs(TomTom.w_points) do
 			local w_icon = entry.icon