projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ready for 1.7 release.
[open-adventure.git]
/
make_dungeon.py
diff --git
a/make_dungeon.py
b/make_dungeon.py
index b3e08fde39ac7fc2f6aa63205c987f759647ee2e..63eee94ed241863772ee71465c6a25b7d07e7c7c 100755
(executable)
--- a/
make_dungeon.py
+++ b/
make_dungeon.py
@@
-6,6
+6,9
@@
# The nontrivial part of this is the compilation of the YAML for
# movement rules to the travel array that's actually used by
# playermove().
# The nontrivial part of this is the compilation of the YAML for
# movement rules to the travel array that's actually used by
# playermove().
+#
+# Copyright (c) 2017 by Eric S. Raymond
+# SPDX-License-Identifier: BSD-2-clause
import sys, yaml
import sys, yaml
@@
-152,8
+155,8
@@
def get_objects(obj):
if labels:
global statedefines
statedefines += "/* States for %s */\n" % item[0]
if labels:
global statedefines
statedefines += "/* States for %s */\n" % item[0]
- for (
j
, label) in enumerate(labels):
- statedefines += "#define %s\t%d\n" % (label,
j
)
+ for (
n
, label) in enumerate(labels):
+ statedefines += "#define %s\t%d\n" % (label,
n
)
statedefines += "\n"
sounds_str = ""
if attr.get("sounds") == None:
statedefines += "\n"
sounds_str = ""
if attr.get("sounds") == None:
@@
-437,7
+440,7
@@
def buildtravel(locs, objs):
# At this point the ltravel data is in the Section 3
# representation from the FORTRAN version. Next we perform the
# At this point the ltravel data is in the Section 3
# representation from the FORTRAN version. Next we perform the
- # same mapping into w
g
at used to be the runtime format.
+ # same mapping into w
h
at used to be the runtime format.
travel = [[0, "LOC_NOWHERE", 0, 0, 0, 0, 0, 0, "false", "false"]]
tkey = [0]
travel = [[0, "LOC_NOWHERE", 0, 0, 0, 0, 0, 0, "false", "false"]]
tkey = [0]