Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cbfcec8c authored by Florent Bouchez Tichadou's avatar Florent Bouchez Tichadou
Browse files

fix: str concat with list when engine_tags empty

parent ab2ed80e
No related branches found
No related tags found
No related merge requests found
Subproject commit 988254c69dc15632c00c1a1ea0dbcff43ee6193f
Subproject commit 49da81f86e7e7f45ad11e8af7e03c8dbbfabb235
......@@ -364,6 +364,10 @@ def generate_dict(file):
# Tags
elif head in ["tags", "tag"]:
metadata["tags"] += str_to_list(tail)
elif head.endswith("tags"):
if head not in metadata:
metadata[head] = []
metadata[head] += str_to_list(tail)
# Raw hints
elif head.startswith("hint"):
metadata["hints"].append(tail)
......
......@@ -123,6 +123,7 @@ create_dir(WORKING_DIR)
# 1 Reads the metadata from the main.c file
metadata = generate_dict(MAIN_SOURCE_FILE)
logging.debug("Metadata:")
logging.debug(str(metadata))
# 2 Apply tags to engine and level files
......@@ -182,6 +183,7 @@ logging.debug(
SOURCE_ENGINE_DIR = os.path.join(AGDBENTURES_DIR, "engines", metadata["engine_name"])
logging.debug(f"Source engine dir {SOURCE_ENGINE_DIR}")
process_directory(
SOURCE_ENGINE_DIR, defines=metadata["engine_tags"], udefines=["engine_antitags"]
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment