Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion schemas/Manual.items.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"category": {
"description": "(Optional) A list of categories to be applied to this item.",
"type": "array",
"type": ["string", "array"],
"items": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion schemas/Manual.locations.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"category": {
"description": "(Optional) A list of categories to be applied to this location.",
"type": "array",
"type": ["string", "array"],
"items": {
"type": "string"
},
Expand Down
3 changes: 3 additions & 0 deletions src/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

item_table[key]["id"] = count
item_table[key]["progression"] = val["progression"] if "progression" in val else False
if isinstance(val.get("category", []), str):
item_table[key]["category"] = [val["category"]]

count += 1

for item in item_table:
Expand Down
5 changes: 4 additions & 1 deletion src/Locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@

location_table[key]["id"] = count

if not "region" in location_table[key]:
if "region" not in location_table[key]:
location_table[key]["region"] = "Manual" # all locations are in the same region for Manual

if isinstance(location_table[key].get("category", []), str):
location_table[key]["category"] = [location_table[key]["category"]]

count += 1

if not victory_names:
Expand Down