mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-18 21:38:13 -07:00
Compare commits
4 Commits
adventure-
...
fix-text-c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8fe779add | ||
|
|
95af4554d5 | ||
|
|
e95a850f11 | ||
|
|
1b8b256886 |
@@ -169,9 +169,9 @@ def generate_yaml(game: str):
|
|||||||
else:
|
else:
|
||||||
options[key] = val
|
options[key] = val
|
||||||
|
|
||||||
# Detect and build ItemDict options from their name pattern
|
|
||||||
for key, val in options.copy().items():
|
for key, val in options.copy().items():
|
||||||
key_parts = key.rsplit("||", 2)
|
key_parts = key.rsplit("||", 2)
|
||||||
|
# Detect and build ItemDict options from their name pattern
|
||||||
if key_parts[-1] == "qty":
|
if key_parts[-1] == "qty":
|
||||||
if key_parts[0] not in options:
|
if key_parts[0] not in options:
|
||||||
options[key_parts[0]] = {}
|
options[key_parts[0]] = {}
|
||||||
@@ -179,6 +179,13 @@ def generate_yaml(game: str):
|
|||||||
options[key_parts[0]][key_parts[1]] = int(val)
|
options[key_parts[0]][key_parts[1]] = int(val)
|
||||||
del options[key]
|
del options[key]
|
||||||
|
|
||||||
|
# Detect keys which end with -custom, indicating a TextChoice with a possible custom value
|
||||||
|
elif key_parts[-1].endswith("-custom"):
|
||||||
|
if val:
|
||||||
|
options[key_parts[-1][:-7]] = val
|
||||||
|
|
||||||
|
del options[key]
|
||||||
|
|
||||||
# Detect random-* keys and set their options accordingly
|
# Detect random-* keys and set their options accordingly
|
||||||
for key, val in options.copy().items():
|
for key, val in options.copy().items():
|
||||||
if key.startswith("random-"):
|
if key.startswith("random-"):
|
||||||
|
|||||||
Reference in New Issue
Block a user