Skip to content

Commit 9c2b6d6

Browse files
committed
Fixed multi-town issue with location detection
1 parent f706a62 commit 9c2b6d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/009-walker.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Walker = (function()
7373
resumeWalker()
7474
when(EVENT_PATH_END, nil, function()
7575
debug('Reached destination: ' .. destination)
76-
_script.lastDestination = destination
76+
_script.lastDestination = {name=destination, town=town}
7777
walkCallback()
7878
end)
7979
end
@@ -317,7 +317,7 @@ Walker = (function()
317317

318318
local selfPos = xeno.getSelfPosition()
319319
local lastDest = _script.lastDestination
320-
local lastDestLabel = lastDest and ('%s|%s~depot'):format(targetTown, lastDest)
320+
local lastDestLabel = lastDest and ('%s|%s~depot'):format(lastDest.town, lastDest.name)
321321
local lastDestPos = lastDestLabel and walkerGetPosAfterLabel(lastDestLabel)
322322
local labelList = nil
323323
local closestLabel = nil

0 commit comments

Comments
 (0)