add graphics

This commit is contained in:
Anthony Samms
2025-12-19 09:40:36 -05:00
committed by Valerio
parent 40095705e0
commit efea2d8f9b
4 changed files with 19 additions and 7 deletions

View File

@@ -9,7 +9,7 @@ nijiiro_notes = false
log_level = 30
fake_online = false
practice_mode_bar_delay = 1
score_method = "gen3"
score_method = "shinuchi"
[nameplate_1p]
name = 'どんちゃん'

View File

@@ -18,6 +18,7 @@ class GeneralConfig(TypedDict):
log_level: int
fake_online: bool
practice_mode_bar_delay: int
score_method: str
class NameplateConfig(TypedDict):
name: str

View File

@@ -58,6 +58,10 @@ class Judgments(IntEnum):
OK = 1
BAD = 2
class ScoreMethod():
GEN3 = "gen3"
SHINUCHI = "shinuchi"
class GameScreen(Screen):
JUDGE_X = 414 * tex.screen_scale
JUDGE_Y = 256 * tex.screen_scale
@@ -409,9 +413,9 @@ class Player:
self.base_score = 0
self.score_init = 0
self.score_diff = 0
if self.score_method =="shinuchi":
if self.score_method == ScoreMethod.SHINUCHI:
self.base_score = calculate_base_score(total_notes)
elif self.score_method == "gen3":
elif self.score_method == ScoreMethod.GEN3:
self.score_diff = self.tja.metadata.course_data[self.difficulty].scorediff
if self.score_diff <= 0:
logger.warning("Error: No scorediff specified or scorediff less than 0 | Using shinuchi scoring method instead")
@@ -880,7 +884,7 @@ class Player:
ok_window_ms = Player.TIMING_OK
bad_window_ms = Player.TIMING_BAD
if self.score_method == "gen3":
if self.score_method == ScoreMethod.GEN3:
self.base_score = self.score_init
if 9 < self.combo and self.combo < 30:
self.base_score = math.floor(self.score_init + 1 * self.score_diff)
@@ -986,7 +990,7 @@ class Player:
self.chara.set_animation('balloon_popping')
self.balloon_anim.update(current_time, self.curr_balloon_count, not self.is_balloon)
if self.balloon_anim.is_finished:
if self.score_method == "gen3":
if self.score_method == ScoreMethod.GEN3:
self.score += 5000
self.base_score_list.append(ScoreCounterAnimation(self.player_num, 5000, self.is_2p))
self.balloon_anim = None
@@ -1264,7 +1268,10 @@ class Player:
def draw_modifiers(self):
"""Shows the currently selected modifiers"""
modifiers_to_draw = ['mod_shinuchi']
modifiers_to_draw = []
if self.score_method == ScoreMethod.SHINUCHI:
modifiers_to_draw.append('mod_shinuchi')
# Speed modifiers
if global_data.modifiers[self.player_num].speed >= 4:

View File

@@ -14,6 +14,7 @@ from libs.utils import (
is_l_don_pressed,
is_r_don_pressed
)
from scenes.game import ScoreMethod
logger = logging.getLogger(__name__)
@@ -218,7 +219,10 @@ class ResultPlayer:
"""
if not self.fade_in_finished:
return
if global_data.config["general"]["score_method"] == ScoreMethod.SHINUCHI:
tex.draw_texture('score', 'score_shinuchi', index=self.is_2p)
else:
tex.draw_texture('score', 'score', index=self.is_2p)
if self.score != '':
for i in range(len(str(self.score))):
tex.draw_texture('score', 'score_num', x=-(i*tex.skin_config["result_score_margin"].x), frame=int(str(self.score)[::-1][i]), index=self.is_2p)