dan hotfixes

This commit is contained in:
Anthony Samms
2025-12-20 12:51:09 -05:00
parent 4e5b43187f
commit 371f9385fc
2 changed files with 5 additions and 5 deletions

View File

@@ -1105,11 +1105,11 @@ class DanCourse(FileSystemItem):
path = Path(global_data.song_hashes[hash_val][i]["file_path"]) path = Path(global_data.song_hashes[hash_val][i]["file_path"])
break break
if (path.parent.parent / "box.def").exists(): if (path.parent.parent / "box.def").exists():
texture_index = parse_box_def(path.parent.parent)[1] genre_index = parse_box_def(path.parent.parent)[2]
else: else:
texture_index = TextureIndex.DEFAULT genre_index = GenreIndex.NAMCO
tja = TJAParser(path) tja = TJAParser(path)
self.charts.append((tja, texture_index, difficulty, tja.metadata.course_data[difficulty].level)) self.charts.append((tja, genre_index, difficulty, tja.metadata.course_data[difficulty].level))
self.exams = [] self.exams = []
for exam in data["exams"]: for exam in data["exams"]:
self.exams.append(Exam(exam["type"], exam["value"][0], exam["value"][1], exam["range"])) self.exams.append(Exam(exam["type"], exam["value"][0], exam["value"][1], exam["range"]))
@@ -1348,7 +1348,7 @@ class FileNavigator:
# Determine if current directory has child directories with box.def # Determine if current directory has child directories with box.def
has_children = False has_children = False
if self.is_at_root() or selected_item and selected_item.box.texture_index == 13: if self.is_at_root() or selected_item and selected_item.box.genre_index == GenreIndex.DAN:
has_children = True # Root always has "children" (the root directories) has_children = True # Root always has "children" (the root directories)
else: else:
has_children = any(item.is_dir() and (item / "box.def").exists() has_children = any(item.is_dir() and (item / "box.def").exists()

View File

@@ -154,7 +154,7 @@ class SongSelectScreen(Screen):
self.text_fade_out.start() self.text_fade_out.start()
elif action == "select_song": elif action == "select_song":
current_song = self.navigator.get_current_item() current_song = self.navigator.get_current_item()
if isinstance(current_song, Directory) and current_song.box.texture_index == 13: if isinstance(current_song, Directory) and current_song.box.genre_index == GenreIndex.DAN:
if len(self.navigator.directory_contents[str(current_song.path)]) == 0: if len(self.navigator.directory_contents[str(current_song.path)]) == 0:
return return
self.dan_transition.start() self.dan_transition.start()