Compare commits

...

2 Commits

Author SHA1 Message Date
f08e01cba8
Merge branch 'BugFix' into VirtualShips 2024-03-30 10:58:25 -04:00
1b0b1eaaf8
Minor Fixes to the mapper
Minor fixes to the mapper and a small workaround for non visible rooms
2024-03-25 01:44:22 -04:00

View File

@ -227,6 +227,7 @@ function lotj.mapper.startMapping(areaName)
end
lotj.mapper.mappingArea = areaName
lotj.mapper.lastMoveDirs = {}
lotj.mapper.processCurrentRoom()
end
@ -464,6 +465,26 @@ function lotj.mapper.processCurrentRoom()
lastRoom = lotj.mapper.getRoomByVnum(lotj.mapper.last.vnum)
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
if room == nil then
lotj.mapper.log("Added new room: <yellow>"..lotj.mapper.current.name.."<reset>")