From eccca031dd4692b44ec86391ad2129d49608cacd Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 5 Feb 2017 12:48:17 +1030 Subject: [PATCH] Join everything together in the map --- tools/graph.py | 58 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/tools/graph.py b/tools/graph.py index ae09387..5136789 100755 --- a/tools/graph.py +++ b/tools/graph.py @@ -15,9 +15,12 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import graphviz import struct import textwrap +dot = graphviz.Digraph() + rooms = {} class Door: @@ -32,6 +35,8 @@ class Room: self.description = None self.doors = [] self.callback = None + + self.digraph = None def __str__(self): return """< @@ -53,7 +58,8 @@ class Item: self.description = None self.room = None self.callback = None - + + self.digraph = None def __str__(self): return """< @@ -78,7 +84,7 @@ with open('../dumps/init.raw', 'rb') as data: SYN_MEM[i] = struct.unpack('