1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-22 00:21:32 +00:00

Fixed formatting over 1e1000 and rebranded to Modding Tree

This commit is contained in:
Acamaeda 2020-09-26 23:42:41 -04:00
parent ee93ff85c0
commit 63060535e2
2 changed files with 11 additions and 11 deletions

View file

@ -1,6 +1,6 @@
<!DOCTYPE html>
<head>
<title>The Candy Tree</title>
<title>The Modding Tree</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
@ -17,7 +17,7 @@
<div class="vl" v-if="player.tab!='tree'&&player.tab!='gameEnded'"></div>
<div v-if="player.tab=='gameEnded'" class="fullWidth">
<br>
<h2>The Candy Tree {{VERSION.withoutName}}</h2><br><br>
<h2>The Modding Tree {{VERSION.withoutName}}</h2><br><br>
<h3>Congratulations! You have reached the end and beaten this game, but for now...</h3><br>
<h3>Please check the Discord to see there are new content updates!</h3><br><br>
<div v-if="!player.timePlayedReset">It took you {{formatTime(player.timePlayed)}} to beat the game.</div>
@ -51,11 +51,11 @@
</div>
<div v-if="player.tab=='info'" class="col right">
<button class="back" onclick="showTab('tree')"></button><br>
<h2>The Candy Tree</h2>
<h2>The Modding Tree</h2>
<br>
<h3>{{VERSION.withName}}</h3>
<br>
The Candy Tree and code refactor by Acamaeda
The Modding Tree and code refactor by Acamaeda
<br>
The Prestige Tree made by Jacorb and Aarex
<br>
@ -168,8 +168,8 @@
<script>
// Mod Identifier, for ~~btpt~~ any userscripts. Consider adding this to your mod!
const modInfo = {
name: "The Candy Tree",
id: "crossover"
name: "The Modding Tree",
id: "modbase"
}
</script>
</body>

View file

@ -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)