X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=make_graph.py;h=82b86af87d34f474ed6ee02b315f2c971b33f384;hb=9812b7a357a892a0a45321e247ee7de83178602b;hp=f29c3e183b5a1b1ef1057e01a1aa7c849ef870fc;hpb=3f3e1145363712fe21c767bae71607fc34c04ec5;p=open-adventure.git diff --git a/make_graph.py b/make_graph.py index f29c3e1..82b86af 100755 --- a/make_graph.py +++ b/make_graph.py @@ -9,7 +9,7 @@ Make a DOT graph of Colossal Cave. -f = emit graph of forest locations -m = emit graph of maze all alike -s = emit graph of non-forest surface locations --v = include internal sy,no;s in room labels +-v = include internal symbols in room labels """ # Copyright (c) 2017 by Eric S. Raymond # SPDX-License-Identifier: BSD-2-clause @@ -18,11 +18,11 @@ import sys, getopt, yaml def allalike(loc): "Select out loci related to the Maze All Alike" - return ("ALIKE" in loc) or (loc == "LOC_PITBRINK") or ("MAZEEND" in loc) or ("STALACTITE" in loc) + return location_lookup[loc]["conditions"].get("ALLALIKE") def alldifferent(loc): "Select out loci related to the Maze All Alike" - return ("DIFFERENT" in loc) or (loc == "LOC_DEADEND13") + return location_lookup[loc]["conditions"].get("ALLDIFFERENT") def surface(loc): "Select out surface locations"