mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
add DFC crown! Thank you SomehowScarlet
This commit is contained in:
2
.github/workflows/python-app.yml
vendored
2
.github/workflows/python-app.yml
vendored
@@ -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"
|
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
|
# 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
|
# 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"
|
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"
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class Background:
|
|||||||
is_rainbow = gauge.gauge_length == gauge.gauge_max
|
is_rainbow = gauge.gauge_length == gauge.gauge_max
|
||||||
clear_threshold = gauge.clear_start[min(gauge.difficulty, 3)]
|
clear_threshold = gauge.clear_start[min(gauge.difficulty, 3)]
|
||||||
if gauge.gauge_length < clear_threshold:
|
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:
|
else:
|
||||||
current_milestone = self.max_dancers
|
current_milestone = self.max_dancers
|
||||||
if current_milestone > self.last_milestone and current_milestone < self.max_dancers:
|
if current_milestone > self.last_milestone and current_milestone < self.max_dancers:
|
||||||
|
|||||||
@@ -73,7 +73,9 @@ class ResultScreen:
|
|||||||
self.update_index = 0
|
self.update_index = 0
|
||||||
self.is_skipped = False
|
self.is_skipped = False
|
||||||
self.start_ms = get_current_ms()
|
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'
|
self.crown_type = 'crown_fc'
|
||||||
else:
|
else:
|
||||||
self.crown_type = 'crown_clear'
|
self.crown_type = 'crown_clear'
|
||||||
|
|||||||
@@ -686,13 +686,17 @@ class SongBox:
|
|||||||
if valid_scores:
|
if valid_scores:
|
||||||
highest_key = max(valid_scores.keys())
|
highest_key = max(valid_scores.keys())
|
||||||
score = self.scores[highest_key]
|
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)
|
tex.draw_texture('yellow_box', 'crown_fc', x=x, y=y, frame=highest_key)
|
||||||
elif score and score[4] == 1:
|
elif score and score[4] == 1:
|
||||||
tex.draw_texture('yellow_box', 'crown_clear', x=x, y=y, frame=highest_key)
|
tex.draw_texture('yellow_box', 'crown_clear', x=x, y=y, frame=highest_key)
|
||||||
if self.crown: #Folder lamp
|
if self.crown: #Folder lamp
|
||||||
highest_crown = max(self.crown)
|
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)
|
tex.draw_texture('yellow_box', 'crown_fc', x=x, y=y, frame=highest_crown)
|
||||||
else:
|
else:
|
||||||
tex.draw_texture('yellow_box', 'crown_clear', x=x, y=y, frame=highest_crown)
|
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:
|
for diff in self.tja.metadata.course_data:
|
||||||
if diff >= 4:
|
if diff >= 4:
|
||||||
continue
|
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:
|
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)
|
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:
|
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])
|
all_scores[diff].append(song_obj.box.scores[diff])
|
||||||
|
|
||||||
for diff in all_scores:
|
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'
|
crowns[diff] = 'FC'
|
||||||
elif all(score is not None and score[4] == 1 for score in all_scores[diff]):
|
elif all(score is not None and score[4] == 1 for score in all_scores[diff]):
|
||||||
crowns[diff] = 'CLEAR'
|
crowns[diff] = 'CLEAR'
|
||||||
|
|||||||
Reference in New Issue
Block a user