4
4
5
5
Author: Nick Gammon
6
6
Date: 11th March 2010
7
+ Amended: 3rd May 2010
7
8
8
9
Generic MUD mapper.
9
10
@@ -59,7 +60,7 @@ Room info should include:
59
60
60
61
module (... , package.seeall )
61
62
62
- VERSION = 1.7 -- for querying by plugins
63
+ VERSION = 1.8 -- for querying by plugins
63
64
64
65
require " movewindow"
65
66
require " copytable"
@@ -596,7 +597,7 @@ local function draw_room (uid, path, x, y)
596
597
local coords = string.format (" %i,%i" , math.floor (x ), math.floor (y ))
597
598
598
599
-- need this for the *current* room !!!
599
- drawn_coords [coords ] = true
600
+ drawn_coords [coords ] = uid
600
601
601
602
-- print ("drawing", uid, "at", coords)
602
603
@@ -690,8 +691,7 @@ local function draw_room (uid, path, x, y)
690
691
end -- if
691
692
692
693
-- if another room (not where this one leads to) is already there, only draw "stub" lines
693
- if drawn_coords [next_coords ] and
694
- (drawn [exit_uid ] and drawn [exit_uid ].coords ~= next_coords ) then
694
+ if drawn_coords [next_coords ] and drawn_coords [next_coords ] ~= exit_uid then
695
695
exit_info = stub_exit_info
696
696
elseif exit_uid == uid then
697
697
@@ -714,7 +714,7 @@ local function draw_room (uid, path, x, y)
714
714
local new_path = copytable .deep (path )
715
715
table.insert (new_path , { dir = dir , uid = exit_uid })
716
716
table.insert (rooms_to_be_drawn , add_another_room (exit_uid , new_path , next_x , next_y ))
717
- drawn_coords [next_coords ] = true
717
+ drawn_coords [next_coords ] = exit_uid
718
718
plan_to_draw [exit_uid ] = next_coords
719
719
720
720
-- if exit room known
0 commit comments