From 0f0e3de9353c06dfaabc00682b4c2fd9c5f48924 Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Wed, 14 Jul 2021 01:12:14 +0200 Subject: Kartik Fox Nest! --- views/script/core_stats.js | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'views/script/core_stats.js') diff --git a/views/script/core_stats.js b/views/script/core_stats.js index a49851d..c8d26df 100644 --- a/views/script/core_stats.js +++ b/views/script/core_stats.js @@ -1,31 +1,5 @@ const fs = require('fs'); const homedir = require('@electron/remote').getCurrentWindow().homedir; -const defaultStats = { - times: { - single: 0, - local: 0, - online: 0 - }, - results: { - wins: 0, - loses: 0 - }, - ingame: { - walls: 0, - laps: 0, - turns: 0 - } -} - -if (!fs.existsSync(homedir + "/.kartik/stats.json")) { - fs.writeFileSync(homedir + "/.kartik/stats.json", JSON.stringify(defaultStats)); -} else { - try { - JSON.parse(fs.readFileSync(homedir + "/.kartik/stats.json").toString()); - } catch (e) { - fs.writeFileSync(homedir + "/.kartik/stats.json", JSON.stringify(defaultStats)); - } -} session = null; timer = null; -- cgit