mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 11:18:26 +02:00
fixed disabling "keep_original_track" : bmg are now correct
This commit is contained in:
parent
438e303b3b
commit
44c2fbc9fc
2 changed files with 40 additions and 29 deletions
|
@ -115,12 +115,12 @@ class CT_Config:
|
|||
open(directory + "RCTFILE.txt", "w", encoding="utf-8") as rctfile:
|
||||
|
||||
lecode_flags = []
|
||||
if not self.keep_original_track: lecode_flags.append("N$NONE")
|
||||
else:
|
||||
lecode_flags.append("N$SHOW")
|
||||
if self.add_original_track_prefix: lecode_flags.append("N$F_WII")
|
||||
if self.swap_original_order: lecode_flags.append("N$SWAP")
|
||||
|
||||
if not self.keep_original_track: lecode_flags.append("N$NONE")
|
||||
else: lecode_flags.append("N$SHOW")
|
||||
|
||||
header = (
|
||||
"#CT-CODE\n"
|
||||
"[RACING-TRACK-LIST]\n"
|
||||
|
|
|
@ -291,6 +291,7 @@ class Game:
|
|||
with open(extra_common_path, "w", encoding="utf8") as f:
|
||||
f.write("#BMG\n")
|
||||
|
||||
if self.common.ct_config.keep_original_track:
|
||||
for bmgtrack in bmgtracks.split("\n"):
|
||||
if "=" in bmgtrack:
|
||||
|
||||
|
@ -323,6 +324,16 @@ class Game:
|
|||
if not self.common.ct_config.add_original_track_prefix: prefix = ""
|
||||
f.write(f" {track_id}\t= {prefix}{track_name}\n")
|
||||
|
||||
else:
|
||||
for cup_index, cup in enumerate(self.common.ct_config.get_all_cups(), start=1):
|
||||
if cup_index > 8: break # only keep the 8 first cup
|
||||
for track_index, track in enumerate(cup.get_tracks(), start=1):
|
||||
f.write(
|
||||
f" T{cup_index}{track_index}\t= "
|
||||
f"{track.get_track_formatted_name(filter_highlight=self.common.ct_config.filter_track_highlight)}"
|
||||
f"\n"
|
||||
)
|
||||
|
||||
def patch_bmg(self, gamefile: str) -> None:
|
||||
"""
|
||||
Patch bmg file (text file)
|
||||
|
|
Loading…
Reference in a new issue