Starting item and battle stuff

This commit is contained in:
2026-07-08 10:05:21 -05:00
parent a73f55beb0
commit b693ea4102
41 changed files with 1727 additions and 20 deletions
+7 -3
View File
@@ -20,8 +20,12 @@ rows = {}
with open(args.csv, newline="", encoding="utf-8") as f:
reader = csv.DictReader(f)
if "id" not in reader.fieldnames or "type" not in reader.fieldnames:
raise ValueError("CSV must have 'id' and 'type' columns")
if (
"id" not in reader.fieldnames or
"type" not in reader.fieldnames or
"name" not in reader.fieldnames
):
raise ValueError("CSV must have 'id', 'type', and 'name' columns")
for row in reader:
item_id, item_type = row["id"], row["type"]
if item_id not in item_ids:
@@ -85,7 +89,7 @@ for i in item_ids:
f" [{id_enum(i)}] = {{",
f" .id = {id_enum(i)},",
f" .type = {type_enum(row['type'])},",
f" .name = \"{i}\",",
f" .name = \"item.{row['name']}.name\",",
" },",
]
out += [