Handling some cases where mapper got confused about invalid exits

This commit is contained in:
Matt Wagner 2021-09-29 11:18:57 -07:00
parent a5d11b95c2
commit 782499c775
2 changed files with 6 additions and 0 deletions

View File

@ -237,6 +237,7 @@ function lotj.mapper.stopMapping()
return return
end end
lotj.mapper.mappingArea = nil lotj.mapper.mappingArea = nil
lotj.mapper.lastMoveDirs = nil
lotj.mapper.log("Mapping <red>stopped<reset>. Don't forget to <yellow>map save<reset>!") lotj.mapper.log("Mapping <red>stopped<reset>. Don't forget to <yellow>map save<reset>!")
end end
@ -546,6 +547,7 @@ end
-- The vnum is always sent after the name and exits, so we can use it as a trigger for -- The vnum is always sent after the name and exits, so we can use it as a trigger for
-- handling movement to a new room -- handling movement to a new room
function lotj.mapper.onEnterRoom() function lotj.mapper.onEnterRoom()
lotj.mapper.logDebug("Handling entered room, vnum "..gmcp.Room.Info.vnum)
if lotj.mapper.current ~= nil then if lotj.mapper.current ~= nil then
lotj.mapper.last = lotj.mapper.current lotj.mapper.last = lotj.mapper.current
end end

View File

@ -35,6 +35,10 @@
{ {
"pattern": "^In your dreams, or what\\?$", "pattern": "^In your dreams, or what\\?$",
"type": "regex" "type": "regex"
},
{
"pattern": "^That room is private right now.$",
"type": "regex"
} }
], ],
"script": "lotj.mapper.popMoveDir()" "script": "lotj.mapper.popMoveDir()"