From 9c83611d2bfc2b55771df1a3b88b27982881f457 Mon Sep 17 00:00:00 2001 From: Anthony Samms Date: Tue, 16 Sep 2025 13:34:04 -0400 Subject: [PATCH] add DFC crown! Thank you SomehowScarlet --- .github/workflows/python-app.yml | 2 +- libs/background.py | 2 +- scenes/result.py | 4 +++- scenes/song_select.py | 14 +++++++++++--- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index dae1dbf..75713ff 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -63,7 +63,7 @@ jobs: curl -L https://github.com/PortAudio/portaudio/releases/download/v19.7.0/pa_stable_v190700_20210406_msvc.zip -o portaudio_msvc.zip 2>/dev/null || echo "MSVC binaries not available" # Option 2: Try community builds - curl -L https://github.com/spatialaudio/portaudio-binaries/blob/master/libportaudio64bit-asio.dll || echo "Community binaries not available" + curl -L https://github.com/spatialaudio/portaudio-binaries/raw/master/libportaudio64bit-asio.dll -o libportaudio64bit-asio.dll 2>/dev/null || echo "Community binaries not available" # Option 3: Try a known working ASIO-enabled build curl -L https://www.un4seen.com/files/z/1/bass24-win32.zip -o bass_example.zip 2>/dev/null || echo "Alternative audio library not available" diff --git a/libs/background.py b/libs/background.py index d0167ec..6c2b631 100644 --- a/libs/background.py +++ b/libs/background.py @@ -55,7 +55,7 @@ class Background: is_rainbow = gauge.gauge_length == gauge.gauge_max clear_threshold = gauge.clear_start[min(gauge.difficulty, 3)] if gauge.gauge_length < clear_threshold: - current_milestone = min(self.max_dancers, int(gauge.gauge_length / (clear_threshold / self.max_dancers))) + current_milestone = min(self.max_dancers - 1, int(gauge.gauge_length / (clear_threshold / self.max_dancers))) else: current_milestone = self.max_dancers if current_milestone > self.last_milestone and current_milestone < self.max_dancers: diff --git a/scenes/result.py b/scenes/result.py index 2ffa8ea..1cb0fed 100644 --- a/scenes/result.py +++ b/scenes/result.py @@ -73,7 +73,9 @@ class ResultScreen: self.update_index = 0 self.is_skipped = False self.start_ms = get_current_ms() - if session_data.result_bad == 0: + if session_data.result_ok == 0 and session_data.result_bad == 0: + self.crown_type = 'crown_dfc' + elif session_data.result_bad == 0: self.crown_type = 'crown_fc' else: self.crown_type = 'crown_clear' diff --git a/scenes/song_select.py b/scenes/song_select.py index c478722..1678954 100644 --- a/scenes/song_select.py +++ b/scenes/song_select.py @@ -686,13 +686,17 @@ class SongBox: if valid_scores: highest_key = max(valid_scores.keys()) score = self.scores[highest_key] - if score and score[3] == 0: + if score and score[2] == 0 and score[3] == 0: + tex.draw_texture('yellow_box', 'crown_dfc', x=x, y=y, frame=highest_key) + elif score and score[3] == 0: tex.draw_texture('yellow_box', 'crown_fc', x=x, y=y, frame=highest_key) elif score and score[4] == 1: tex.draw_texture('yellow_box', 'crown_clear', x=x, y=y, frame=highest_key) if self.crown: #Folder lamp highest_crown = max(self.crown) - if self.crown[highest_crown] == 'FC': + if self.crown[highest_crown] == 'DFC': + tex.draw_texture('yellow_box', 'crown_dfc', x=x, y=y, frame=highest_crown) + elif self.crown[highest_crown] == 'FC': tex.draw_texture('yellow_box', 'crown_fc', x=x, y=y, frame=highest_crown) else: tex.draw_texture('yellow_box', 'crown_clear', x=x, y=y, frame=highest_crown) @@ -844,6 +848,8 @@ class YellowBox: for diff in self.tja.metadata.course_data: if diff >= 4: continue + elif diff in song_box.scores and song_box.scores[diff] is not None and song_box.scores[diff][2] == 0 and song_box.scores[diff][3] == 0: + tex.draw_texture('yellow_box', 's_crown_dfc', x=(diff*60), color=color) elif diff in song_box.scores and song_box.scores[diff] is not None and song_box.scores[diff][3] == 0: tex.draw_texture('yellow_box', 's_crown_fc', x=(diff*60), color=color) elif diff in song_box.scores and song_box.scores[diff] is not None and song_box.scores[diff][4] == 1: @@ -1955,7 +1961,9 @@ class FileNavigator: all_scores[diff].append(song_obj.box.scores[diff]) for diff in all_scores: - if all(score is not None and score[3] == 0 for score in all_scores[diff]): + if all(score is not None and score[2] == 0 and score[3] == 0 for score in all_scores[diff]): + crowns[diff] = 'DFC' + elif all(score is not None and score[3] == 0 for score in all_scores[diff]): crowns[diff] = 'FC' elif all(score is not None and score[4] == 1 for score in all_scores[diff]): crowns[diff] = 'CLEAR'