projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Address GitLab issue #55: water should not be available in endgame.
[open-adventure.git]
/
make_dungeon.py
diff --git
a/make_dungeon.py
b/make_dungeon.py
index 260157847530b9eef0196fb7a20b6112be8dbb6e..724b941d9652c10b824e1c9ec42486cd7a075a76 100755
(executable)
--- a/
make_dungeon.py
+++ b/
make_dungeon.py
@@
-1,4
+1,4
@@
-#!/usr/bin/env python
+#!/usr/bin/env python
3
# This is the open-adventure dungeon generator. It consumes a YAML description of
# the dungeon and outputs a dungeon.h and dungeon.c pair of C code files.
# This is the open-adventure dungeon generator. It consumes a YAML description of
# the dungeon and outputs a dungeon.h and dungeon.c pair of C code files.
@@
-440,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]
@@
-523,7
+523,7
@@
def get_travel(travel):
if __name__ == "__main__":
with open(YAML_NAME, "r") as f:
if __name__ == "__main__":
with open(YAML_NAME, "r") as f:
- db = yaml.load(f)
+ db = yaml.
safe_
load(f)
locnames = [x[0] for x in db["locations"]]
msgnames = [el[0] for el in db["arbitrary_messages"]]
locnames = [x[0] for x in db["locations"]]
msgnames = [el[0] for el in db["arbitrary_messages"]]