Merge branch 'BugFix' into VirtualShips
This commit is contained in:
commit
f08e01cba8
@ -227,6 +227,7 @@ function lotj.mapper.startMapping(areaName)
|
|||||||
end
|
end
|
||||||
|
|
||||||
lotj.mapper.mappingArea = areaName
|
lotj.mapper.mappingArea = areaName
|
||||||
|
lotj.mapper.lastMoveDirs = {}
|
||||||
lotj.mapper.processCurrentRoom()
|
lotj.mapper.processCurrentRoom()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -464,6 +465,26 @@ function lotj.mapper.processCurrentRoom()
|
|||||||
lastRoom = lotj.mapper.getRoomByVnum(lotj.mapper.last.vnum)
|
lastRoom = lotj.mapper.getRoomByVnum(lotj.mapper.last.vnum)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Try to account for moving between visible and non-visible rooms
|
||||||
|
if moveDir ~= nil then
|
||||||
|
if not table.contains(gmcp.Room.Info.exits, revDirObj(moveDir.long).long) then
|
||||||
|
-- There was no return exit in this room matching the movement
|
||||||
|
if not table.is_empty(lotj.mapper.lastMoveDirs) then
|
||||||
|
-- There are additional movements in the table so test those
|
||||||
|
while not table.is_empty(lotj.mapper.lastMoveDirs) do
|
||||||
|
local tempDir = lotj.mapper.popMoveDir()
|
||||||
|
|
||||||
|
if table.contains(gmcp.Room.Info.exits, revDirObj(tempDir.long).long) then
|
||||||
|
-- This seems to be a match so use this one and empty out the last room as it is incorrect
|
||||||
|
moveDir = tempDir
|
||||||
|
lotj.mapper.last = nil
|
||||||
|
lastRoom = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Create the room if we don't have it yet
|
-- Create the room if we don't have it yet
|
||||||
if room == nil then
|
if room == nil then
|
||||||
lotj.mapper.log("Added new room: <yellow>"..lotj.mapper.current.name.."<reset>")
|
lotj.mapper.log("Added new room: <yellow>"..lotj.mapper.current.name.."<reset>")
|
||||||
|
Loading…
Reference in New Issue
Block a user