# Copyright (c) 2017 by Eric S. Raymond
# SPDX-License-Identifier: BSD-2-clause
-import sys, yaml, getopt
+import sys, getopt, yaml
def allalike(loc):
"Select out loci related to the Maze All Alike"
# it ships some message (which is the point) then shifts you to a nexr location.
# A forwarder has a zero-length array of notion verbs in its travel section.
#
-# Here is an examoke forwarder kocation:
+# Here is an example forwarder declaration:
#
# - LOC_GRUESOME:
# description:
subset = surface
else:
sys.stderr.write(__doc__)
- raise SystemExit(1)
+ raise SystemExit(1)
startlocs = {}
for obj in db["objects"]:
startlocs[location] = [objname]
print("digraph G {")
-
+
for (loc, attrs) in db["locations"]:
if is_forwarder(loc):
continue
if loc in startlocs:
node_label += "\\n" + ",".join(startlocs[loc]).lower()
print(' %s [shape=box,label="%s"]' % (loc[4:], node_label))
-
- for (loc, attrs) in db["locations"]:
+
+ for (loc, attrs) in db["locations"]:
travel = attrs["travel"]
if len(travel) > 0:
for dest in travel:
if action[0] == "goto":
dest = forward(action[1])
if not (subset(loc) or subset(dest)):
- continue;
+ continue
arc = "%s -> %s" % (loc[4:], dest[4:])
label=",".join(verbs).lower()
if len(label) > 0: