feat(beatmap,score): support failtime & more exact playtime

This commit is contained in:
MingxuanGame
2025-08-18 08:48:13 +00:00
parent 9ee087306b
commit 219f19d623
9 changed files with 279 additions and 27 deletions

View File

@@ -207,3 +207,11 @@ def mod_to_save(mods: list[APIMod]) -> list[str]:
s = list({mod["acronym"] for mod in mods})
s.sort()
return s
def get_speed_rate(mods: list[APIMod]):
rate = 1.0
for mod in mods:
if mod["acronym"] in {"DT", "NC", "HT", "DC"}:
rate *= mod.get("settings", {}).get("speed_change", 1.0) # pyright: ignore[reportOperatorIssue]
return rate