Skip to content

Commit

Permalink
Moved some parameter switches to the end of the NML file to ensure ve…
Browse files Browse the repository at this point in the history
…hicles are disabled correctly
  • Loading branch information
audigex committed Aug 11, 2024
1 parent 6a3cb2c commit 9c71780
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
13 changes: 11 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
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
disable_item(FEAT_TRAINS, 604); // 24p
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
}
File renamed without changes.
File renamed without changes.

0 comments on commit 9c71780

Please sign in to comment.