projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
object_descriptions[] is now objects[].
[open-adventure.git]
/
newdungeon.py
diff --git
a/newdungeon.py
b/newdungeon.py
index 3399cafa1a01205208e945ae8fe68c19e76878cf..e5169219404fe06992ca82ff0e4fa225e01d1178 100755
(executable)
--- a/
newdungeon.py
+++ b/
newdungeon.py
@@
-51,7
+51,7
@@
typedef struct {{
const char** longs;
const char** sounds;
const char** texts;
const char** longs;
const char** sounds;
const char** texts;
-}} object_
description_
t;
+}} object_t;
typedef struct {{
const char* small;
typedef struct {{
const char* small;
@@
-95,7
+95,7
@@
typedef struct {{
}} vocabulary_t;
extern const location_t locations[];
}} vocabulary_t;
extern const location_t locations[];
-extern const object_
description_t object_description
s[];
+extern const object_
t object
s[];
extern const char* arbitrary_messages[];
extern const class_t classes[];
extern const turn_threshold_t turn_thresholds[];
extern const char* arbitrary_messages[];
extern const class_t classes[];
extern const turn_threshold_t turn_thresholds[];
@@
-122,7
+122,7
@@
enum locations_refs {{
{}
}};
{}
}};
-enum object_
descriptions_
refs {{
+enum object_refs {{
{}
}};
{}
}};
@@
-153,7
+153,7
@@
const location_t locations[] = {{
{}
}};
{}
}};
-const object_
description_t object_description
s[] = {{
+const object_
t object
s[] = {{
{}
}};
{}
}};
@@
-259,7
+259,7
@@
def get_locations(loc):
loc_str = loc_str[:-1] # trim trailing newline
return loc_str
loc_str = loc_str[:-1] # trim trailing newline
return loc_str
-def get_object
_description
s(obj):
+def get_objects(obj):
template = """ {{ // {}
.inventory = {},
.plac = {},
template = """ {{ // {}
.inventory = {},
.plac = {},
@@
-430,7
+430,7
@@
if __name__ == "__main__":
get_class_messages(db["classes"]),
get_turn_thresholds(db["turn_thresholds"]),
get_locations(db["locations"]),
get_class_messages(db["classes"]),
get_turn_thresholds(db["turn_thresholds"]),
get_locations(db["locations"]),
- get_object
_descriptions(db["object_description
s"]),
+ get_object
s(db["object
s"]),
get_obituaries(db["obituaries"]),
get_hints(db["hints"], db["arbitrary_messages"]),
get_condbits(db["locations"]),
get_obituaries(db["obituaries"]),
get_hints(db["hints"], db["arbitrary_messages"]),
get_condbits(db["locations"]),
@@
-440,7
+440,7
@@
if __name__ == "__main__":
h = h_template.format(
len(db["locations"])-1,
h = h_template.format(
len(db["locations"])-1,
- len(db["object
_description
s"])-1,
+ len(db["objects"])-1,
len(db["hints"]),
len(db["classes"]),
len(db["obituaries"]),
len(db["hints"]),
len(db["classes"]),
len(db["obituaries"]),
@@
-449,7
+449,7
@@
if __name__ == "__main__":
len(db["vocabulary"]),
get_refs(db["arbitrary_messages"]),
get_refs(db["locations"]),
len(db["vocabulary"]),
get_refs(db["arbitrary_messages"]),
get_refs(db["locations"]),
- get_refs(db["object
_description
s"]),
+ get_refs(db["objects"]),
statedefines,
)
statedefines,
)