From 63060535e2461b2f518a3ad3da5e67d9dd800e45 Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Sat, 26 Sep 2020 23:42:41 -0400 Subject: [PATCH] Fixed formatting over 1e1000 and rebranded to Modding Tree --- index.html | 12 ++++++------ js/game.js | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 5867399..d85b807 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ - The Candy Tree + The Modding Tree @@ -17,7 +17,7 @@

-

The Candy Tree {{VERSION.withoutName}}



+

The Modding Tree {{VERSION.withoutName}}



Congratulations! You have reached the end and beaten this game, but for now...


Please check the Discord to see there are new content updates!



It took you {{formatTime(player.timePlayed)}} to beat the game.
@@ -51,11 +51,11 @@

-

The Candy Tree

+

The Modding Tree


{{VERSION.withName}}


- The Candy Tree and code refactor by Acamaeda + The Modding Tree and code refactor by Acamaeda
The Prestige Tree made by Jacorb and Aarex
@@ -168,8 +168,8 @@ \ No newline at end of file diff --git a/js/game.js b/js/game.js index 43a2dc7..3115409 100644 --- a/js/game.js +++ b/js/game.js @@ -12,7 +12,7 @@ function getStartPlayer() { notify: {}, msDisplay: "always", offlineProd: true, - versionType: "candy", + versionType: "Modding", version: VERSION.num, beta: VERSION.beta, timePlayed: 0, @@ -86,7 +86,7 @@ function importSave(imported=undefined) { if (imported===undefined) imported = prompt("Paste your save here") try { tempPlr = Object.assign(getStartPlayer(), JSON.parse(atob(imported))) - if(tempPlr.versionType != "candy") // Wrong save + if(tempPlr.versionType != "Modding") // Wrong save return player = tempPlr; fixSave() @@ -101,12 +101,12 @@ function versionCheck() { let setVersion = true if (player.versionType===undefined||player.version===undefined) { - player.versionType = "candy" + player.versionType = "Modding" player.version = 0 } if (setVersion) { - if (player.versionType == "candy" && VERSION.num > player.version) player.keepGoing = false + if (player.versionType == "Modding" && VERSION.num > player.version) player.keepGoing = false player.versionType = getStartPlayer().versionType player.version = VERSION.num player.beta = VERSION.beta @@ -171,7 +171,7 @@ function format(decimal, precision=3) { var slog = decimal.slog() if (slog.gte(1e6)) return "F" + format(slog.floor()) else return Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) + "F" + commaFormat(slog.floor(), 0) - } else if (decimal.gte("1e1000")) return (Math.floor(decimal.mantissa) + formatWhole("e"+formatWhole(decimal.log10()))) + } else if (decimal.gte("1e1000")) return (Math.floor(decimal.mantissa + 0.01) + ("e"+formatWhole(decimal.log10()))) else if (decimal.gte(1e9)) return exponentialFormat(decimal, precision) else if (decimal.gte(1e3)) return commaFormat(decimal, 0) else return commaFormat(decimal, precision)