This commit is contained in:
Renan LE CARO 2025-04-15 16:47:04 +02:00
parent 64a85200b9
commit 47ad04c49b
26 changed files with 313 additions and 247 deletions

View file

@ -1,3 +1,5 @@
import {getSettingValue} from "./settings";
export function clamp(value: number, min: number, max: number) {
return Math.max(min, Math.min(value, max));
}
@ -8,9 +10,8 @@ export function comboKeepingRate(level: number) {
export function hoursSpentPlaying() {
try {
const timePlayed =
localStorage.getItem("breakout_71_total_play_time") || "0";
return Math.floor(parseFloat(timePlayed) / 1000 / 60 / 60);
const timePlayed = getSettingValue('breakout_71_total_play_time',0)
return Math.floor(timePlayed / 1000 / 60 / 60);
} catch (e) {
return 0;
}