mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-16 03:05:03 -04:00
wip
This commit is contained in:
parent
64a85200b9
commit
47ad04c49b
26 changed files with 313 additions and 247 deletions
|
@ -9,7 +9,7 @@ import {
|
|||
pickedUpgradesHTMl,
|
||||
reasonLevelIsLocked,
|
||||
} from "./game_utils";
|
||||
import { getSettingValue, getTotalScore } from "./settings";
|
||||
import {getSettingValue, getTotalScore, setSettingValue} from "./settings";
|
||||
import { stopRecording } from "./recording";
|
||||
import { asyncAlert } from "./asyncAlert";
|
||||
import { rawUpgrades } from "./upgrades";
|
||||
|
@ -18,13 +18,8 @@ import { editRawLevelList } from "./levelEditor";
|
|||
|
||||
export function addToTotalPlayTime(ms: number) {
|
||||
try {
|
||||
localStorage.setItem(
|
||||
"breakout_71_total_play_time",
|
||||
JSON.stringify(
|
||||
JSON.parse(localStorage.getItem("breakout_71_total_play_time") || "0") +
|
||||
ms,
|
||||
),
|
||||
);
|
||||
setSettingValue('breakout_71_total_play_time', getSettingValue('breakout_71_total_play_time',0)+ms)
|
||||
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue