From 942e5a2a4b8f6fff62756827c9d71b5fc4b2623d Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Sun, 4 Oct 2020 21:36:03 -0400 Subject: [PATCH] Added "hide completed challenges" and tweaks from PT 1.2 --- index.html | 16 +++++++++++++++- js/utils.js | 23 +++++++++++++++++++++++ js/v.js | 2 +- style.css | 6 ++++++ 4 files changed, 45 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 47d8e14..39ce8a2 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,9 @@
+
+

Loading... (If this takes too long it means there was a serious error!)

+

@@ -36,6 +39,7 @@
    


+ The Modding Tree Discord
Main Prestige Tree Discord


If you would like to speedrun this, press Play Again and record your attempt, then submit on the Discord Server in the channel #speedrun-submissions. @@ -47,7 +51,12 @@

v1.3: Finally some real progress!

    -
  • Many layer features can now be static values or functions. (This made some notations change, which will break things)
  • +
  • Added subtabs! And also a ???Component
  • +
  • Added ???Big component
  • +
  • Added h-line, v-line and image-display components.
  • +
  • Added "hide completed challenges" setting.
  • +
  • Moved old changelogs to a separate place.
  • +

Full history
@@ -65,6 +74,7 @@ Original idea by papyrus (on discord)


+ The Modding Tree Discord
Main Prestige Tree server

Note by Jacorb: If anyone wishes to make a mod of this game, that is perfectly fine with me, just make sure to name it something different (ex: Prestige Tree NG+) and to let me know on my discord. @@ -91,6 +101,10 @@ + + + +
diff --git a/js/utils.js b/js/utils.js index 9fc324f..4047317 100644 --- a/js/utils.js +++ b/js/utils.js @@ -50,6 +50,14 @@ function formatTime(s) { else return formatWhole(Math.floor(s/3600))+"h "+formatWhole(Math.floor(s/60)%60)+"m "+format(s%60)+"s" } +function toPlaces(x, precision, maxAccepted) { + x = new Decimal(x) + let result = x.toStringWithDecimalPlaces(precision) + if (new Decimal(result).gte(maxAccepted)) { + result = new Decimal(maxAccepted-Math.pow(0.1, precision)).toStringWithDecimalPlaces(precision) + } + return result +} // ************ Save stuff ************ function save() { @@ -70,6 +78,7 @@ function startPlayerBase() { timePlayed: 0, keepGoing: false, hasNaN: false, + hideChalls: false, points: new Decimal(10), } } @@ -216,6 +225,7 @@ function changeTheme() { document.body.style.setProperty('--background_tooltip', aqua ? "rgba(0, 15, 31, 0.75)" : "rgba(0, 0, 0, 0.75)") document.body.style.setProperty('--color', aqua ? "#bfdfff" : "#dfdfdf") document.body.style.setProperty('--points', aqua ? "#dfefff" : "#ffffff") + document.body.style.setProperty("--locked", aqua ? "#c4a7b3" : "#bf8f8f") } function getThemeName() { @@ -235,8 +245,21 @@ function switchTheme() { // ************ Options ************ function toggleOpt(name) { + if (name == "oldStyle" && styleCooldown>0) return; + player[name] = !player[name] if (name == "hqTree") changeTreeQuality() + if (name == "oldStyle") updateStyle() +} + +var styleCooldown = 0; + + +function updateStyle() { + styleCooldown = 1; + let css = document.getElementById("styleStuff") + css.href = player.oldStyle?"oldStyle.css":"style.css" + needCanvasUpdate = true; } function changeTreeQuality() { diff --git a/js/v.js b/js/v.js index 9001d33..9327cad 100644 --- a/js/v.js +++ b/js/v.js @@ -122,7 +122,7 @@ function loadVue() {
-
+

{{tmp.challs[layer][row*10+col].name}}





{{tmp.challs[layer][row*10+col].desc}}
diff --git a/style.css b/style.css index 6fa4b38..7b2ad07 100644 --- a/style.css +++ b/style.css @@ -468,4 +468,10 @@ ul { filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100); opacity: 1; white-space: pre-wrap; +} + +#loadingSection { + display: flex; + flex-direction: column; + justify-content: center; } \ No newline at end of file