Hello,
I am trying to adapt the automapper for TempestSeason.
My latest attempt is here: https://github.com/EmerFox/Mushclient-Plugins-for-Tempest-Season-Mud/blob/master/Tempest_Season_MAP.xml
I want it to automatically add reverse exits when walking around. I can see how it is done in the Example Mapper but I can't figure out how to put them into the sqlite database.
I tried pasting this in at line 712:
That just creates exits in both directions for every room eg if a room has exits north and east, it adds exits south and west too. How do I make it add reverse exits but only when I move?
I am trying to adapt the automapper for TempestSeason.
My latest attempt is here: https://github.com/EmerFox/Mushclient-Plugins-for-Tempest-Season-Mud/blob/master/Tempest_Season_MAP.xml
I want it to automatically add reverse exits when walking around. I can see how it is done in the Example Mapper but I can't figure out how to put them into the sqlite database.
I tried pasting this in at line 712:
dbcheck (db:execute (string.format ([[
UPDATE exits SET touid = %s WHERE fromuid = %s AND dir = %s;
]],
fixsql (from_room), -- previous room
fixsql (current_room), -- destination room
fixsql (inverse_direction.last_direction_moved) -- inverse direction (eg. "s")
)))
room.exits [inverse_direction [last_direction_moved]] = from_room That just creates exits in both directions for every room eg if a room has exits north and east, it adds exits south and west too. How do I make it add reverse exits but only when I move?