Skip to content

Commit 7f40db2

Browse files
committed
Added option to not draw up/down rooms
1 parent 2affd69 commit 7f40db2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lua/mapper.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ init (t) -- call once, supply:
1717
t.timing -- true to show timing
1818
t.show_completed -- true to show "Speedwalk completed."
1919
t.show_other_areas -- true to show non-current areas
20+
t.show_up_down -- follow up/down exits
2021
t.show_area_exits -- true to draw a circle around rooms leading to other areas
2122
t.speedwalk_prefix -- if not nil, speedwalk by prefixing with this
2223
@@ -58,7 +59,7 @@ Room info should include:
5859

5960
module (..., package.seeall)
6061

61-
VERSION = 1.6 -- for querying by plugins
62+
VERSION = 1.7 -- for querying by plugins
6263

6364
require "movewindow"
6465
require "copytable"
@@ -83,6 +84,7 @@ local timing -- true to show timing and other info
8384
local show_completed -- true to show "Speedwalk completed."
8485
local show_other_areas -- true to draw other areas
8586
local show_area_exits -- true to show area exits
87+
local show_up_down -- true to show up/down exits
8688

8789

8890
-- current room number
@@ -698,7 +700,8 @@ local function draw_room (uid, path, x, y)
698700
linetype = 1 -- dash
699701

700702
else
701-
if not show_other_areas and rooms [exit_uid].area ~= current_area then
703+
if (not show_other_areas and rooms [exit_uid].area ~= current_area) or
704+
(not show_up_down and (dir == "u" or dir == "d")) then
702705
exit_info = stub_exit_info -- don't show other areas
703706
else
704707
-- if we are scheduled to draw the room already, only draw a stub this time
@@ -1181,6 +1184,7 @@ function init (t)
11811184
timing = t.timing -- true for timing info
11821185
show_completed = t.show_completed -- true to show "Speedwalk completed." message
11831186
show_other_areas = t.show_other_areas -- true to show other areas
1187+
show_up_down = t.show_up_down -- true to show up or down
11841188
show_area_exits = t.show_area_exits -- true to show area exits
11851189
speedwalk_prefix = t.speedwalk_prefix -- how to speedwalk (prefix)
11861190

0 commit comments

Comments
 (0)