Initialize dwarf locations in YAML, not C.

Minimizes magic numbers.
This commit is contained in:
Eric S. Raymond 2024-01-02 10:32:23 -05:00
parent 1f9f39d789
commit b247359d7f
5 changed files with 28 additions and 8 deletions

View file

@ -626,6 +626,7 @@ if __name__ == "__main__":
tkeys=bigdump(tkey),
travel=get_travel(travel),
ignore=ignore,
dwarflocs=", ".join(db["dwarflocs"]) + ",",
)
# 0-origin index of birds's last song. Bird should
@ -650,6 +651,7 @@ if __name__ == "__main__":
motions=get_refs(db["motions"]),
actions=get_refs(db["actions"]),
state_definitions=statedefines,
ndwarflocs=str(len(db["dwarflocs"])),
)
with open(H_NAME, "w", encoding="ascii", errors="surrogateescape") as hf: