diff --git a/build.py b/build.py index 65ff828..4752299 100644 --- a/build.py +++ b/build.py @@ -267,20 +267,29 @@ def main(grf_name, src_dir, lang_dir, gfx_dir, b_compile_grf, b_run_game): file_list = find_pnml_files(src_directory) print("Finished finding pnml files\n") pnml_files = list() - # Read all the files in folders that begin with "_" into the internal nml + append_files = list() + # Priority folders: Read all the files in folders that begin with "_" into the internal nml for directory in file_list: if directory.startswith("_"): for file in file_list[directory]: print("Reading '%s'" % (file.stem + file.suffix)) nml_file = copy_file(file, nml_file) else: - pnml_files += file_list[directory] + if directory == "append": + append_files += file_list[directory] + else: + pnml_files += file_list[directory] # Read the regular files for file in sorted(pnml_files): print("Reading '%s'" % (file.stem + file.suffix)) nml_file = copy_file(file, nml_file) + # Read the append files (mostly switches to disable units) + for file in sorted(append_files): + print("Reading '%s'" % (file.stem + file.suffix)) + nml_file = copy_file(file, nml_file) + print("Copied all files to internal buffer\n") # Try to write the internal nml to a file diff --git a/src/debugmode_switch.pnml b/src/append/debugmode_switch.pnml similarity index 75% rename from src/debugmode_switch.pnml rename to src/append/debugmode_switch.pnml index 98fb77c..f36f454 100644 --- a/src/debugmode_switch.pnml +++ b/src/append/debugmode_switch.pnml @@ -6,6 +6,9 @@ disable_item(FEAT_TRAINS, 674); // Stephenson's Planet // Disable some trains that only exist for template alignment or debugging + disable_item(FEAT_TRAINS, 9999); // Debug variant header + disable_item(FEAT_TRAINS, 609); // 4px + disable_item(FEAT_TRAINS, 610); // 8px disable_item(FEAT_TRAINS, 601); // 12px disable_item(FEAT_TRAINS, 602); // 16px disable_item(FEAT_TRAINS, 603); // 20px @@ -13,8 +16,5 @@ disable_item(FEAT_TRAINS, 605); // 28px disable_item(FEAT_TRAINS, 606); // 32px disable_item(FEAT_TRAINS, 607); // 28pxOLD - disable_item(FEAT_TRAINS, 608); // 32pxOLD - - - + disable_item(FEAT_TRAINS, 608); // 32pxOLD } \ No newline at end of file diff --git a/src/metroparam_switch.pnml b/src/append/metroparam_switch.pnml similarity index 100% rename from src/metroparam_switch.pnml rename to src/append/metroparam_switch.pnml diff --git a/src/simplemode_switch.pnml b/src/append/simplemode_switch.pnml similarity index 100% rename from src/simplemode_switch.pnml rename to src/append/simplemode_switch.pnml