1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 17:31:50 +00:00

Added "hide completed challenges" and tweaks from PT 1.2

This commit is contained in:
Acamaeda 2020-10-04 21:36:03 -04:00
parent fe573aa500
commit 942e5a2a4b
4 changed files with 45 additions and 2 deletions

View file

@ -25,6 +25,9 @@
</head> </head>
<body onload="load()"> <body onload="load()">
<div id="app"> <div id="app">
<div v-if="false" id="loadingSection" class="fullWidth">
<h1>Loading... (If this takes too long it means there was a serious error!)</h1>
</div>
<div class="vl" v-if="player.tab!='tree'&&player.tab!='gameEnded'"></div> <div class="vl" v-if="player.tab!='tree'&&player.tab!='gameEnded'"></div>
<div v-if="player.tab=='gameEnded'" class="fullWidth"> <div v-if="player.tab=='gameEnded'" class="fullWidth">
<br> <br>
@ -36,6 +39,7 @@
<br> <br>
<button class="longUpg can" onclick="hardReset(true)">Play Again</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="longUpg can" onclick="keepGoing()">Keep Going</button> <button class="longUpg can" onclick="hardReset(true)">Play Again</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="longUpg can" onclick="keepGoing()">Keep Going</button>
<br><br><br> <br><br><br>
<a class="link" href="https://discord.gg/F3xveHV" target="_blank">The Modding Tree Discord</a><br>
<a class="link" href="http://discord.gg/wwQfgPa" target="_blank">Main Prestige Tree Discord</a><br> <a class="link" href="http://discord.gg/wwQfgPa" target="_blank">Main Prestige Tree Discord</a><br>
<br><br> <br><br>
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. 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 @@
<button class="back" onclick="showTab('tree')"></button><br> <button class="back" onclick="showTab('tree')"></button><br>
<h3>v1.3: Finally some real progress!</h3> <h3>v1.3: Finally some real progress!</h3>
<ul> <ul>
<li>Many layer features can now be static values or functions. (This made some notations change, which will break things)</li> <li>Added subtabs! And also a ???Component</li>
<li>Added ???Big component</li>
<li>Added h-line, v-line and image-display components.</li>
<li>Added "hide completed challenges" setting.</li>
<li>Moved old changelogs to a separate place.</li>
<li></li>
</ul><br> </ul><br>
<a href="https://github.com/Acamaeda/The-Modding-Tree/blob/master/changelog.md" target="_blank" class="link" >Full history</a><br> <a href="https://github.com/Acamaeda/The-Modding-Tree/blob/master/changelog.md" target="_blank" class="link" >Full history</a><br>
</div> </div>
@ -65,6 +74,7 @@
Original idea by papyrus (on discord) Original idea by papyrus (on discord)
<br><br> <br><br>
<div class="link" onclick="showTab('changelog')">Changelog</div><br> <div class="link" onclick="showTab('changelog')">Changelog</div><br>
<a class="link" href="https://discord.gg/F3xveHV" target="_blank">The Modding Tree Discord</a><br>
<a class="link" href="http://discord.gg/wwQfgPa" target="_blank">Main Prestige Tree server</a><br> <a class="link" href="http://discord.gg/wwQfgPa" target="_blank">Main Prestige Tree server</a><br>
<br> <br>
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 <a href="https://discord.gg/wwQfgPa" target="_blank">my discord</a>. 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 <a href="https://discord.gg/wwQfgPa" target="_blank">my discord</a>.
@ -91,6 +101,10 @@
<td><button class="opt" onclick="adjustMSDisp()">Show Milestones: {{ player.msDisplay.toUpperCase() }}</button></td> <td><button class="opt" onclick="adjustMSDisp()">Show Milestones: {{ player.msDisplay.toUpperCase() }}</button></td>
<td><button class="opt" onclick="toggleOpt('hqTree')">High-Quality Tree: {{ player.hqTree?"ON":"OFF" }}</button></td> <td><button class="opt" onclick="toggleOpt('hqTree')">High-Quality Tree: {{ player.hqTree?"ON":"OFF" }}</button></td>
</tr> </tr>
<tr>
<td><button class="opt" onclick="toggleOpt('hideChalls')">Completed Challenges: {{ player.hideChalls?"HIDDEN":"SHOWN" }}</button></td>
<!-- <td><button class="opt" onclick="toggleOpt('oldStyle')">Style: {{ player.oldStyle?"v1.0":"NEW" }}</button></td>-->
</tr>
</table> </table>
</div> </div>
<div id="treeTab" v-if="player.tab!='gameEnded'" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.tab == 'tree', col: player.tab != 'tree', left: player.tab != 'tree'}"> <div id="treeTab" v-if="player.tab!='gameEnded'" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.tab == 'tree', col: player.tab != 'tree', left: player.tab != 'tree'}">

View file

@ -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" 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 ************ // ************ Save stuff ************
function save() { function save() {
@ -70,6 +78,7 @@ function startPlayerBase() {
timePlayed: 0, timePlayed: 0,
keepGoing: false, keepGoing: false,
hasNaN: false, hasNaN: false,
hideChalls: false,
points: new Decimal(10), 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('--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('--color', aqua ? "#bfdfff" : "#dfdfdf")
document.body.style.setProperty('--points', aqua ? "#dfefff" : "#ffffff") document.body.style.setProperty('--points', aqua ? "#dfefff" : "#ffffff")
document.body.style.setProperty("--locked", aqua ? "#c4a7b3" : "#bf8f8f")
} }
function getThemeName() { function getThemeName() {
@ -235,8 +245,21 @@ function switchTheme() {
// ************ Options ************ // ************ Options ************
function toggleOpt(name) { function toggleOpt(name) {
if (name == "oldStyle" && styleCooldown>0) return;
player[name] = !player[name] player[name] = !player[name]
if (name == "hqTree") changeTreeQuality() 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() { function changeTreeQuality() {

View file

@ -122,7 +122,7 @@ function loadVue() {
<div v-if="layers[layer].challs" class="upgTable"> <div v-if="layers[layer].challs" class="upgTable">
<div v-for="row in layers[layer].challs.rows" class="upgRow"> <div v-for="row in layers[layer].challs.rows" class="upgRow">
<div v-for="col in layers[layer].challs.cols"> <div v-for="col in layers[layer].challs.cols">
<div v-if="tmp.challs[layer][row*10+col].unl" v-bind:class="{hChall: true, done: player[layer].challs.includes(row*10+col), canComplete: tmp.challActive[layer][row*10+col]&&!player[layer].challs.includes(row*10+col)&&canCompleteChall(layer, row*10+col)}"> <div v-if="tmp.challs[layer][row*10+col].unl && !(player.hideChalls && hasChall(layer, [row*10+col]))" v-bind:class="{hChall: true, done: player[layer].challs.includes(row*10+col), canComplete: tmp.challActive[layer][row*10+col]&&!player[layer].challs.includes(row*10+col)&&canCompleteChall(layer, row*10+col)}">
<br><h3>{{tmp.challs[layer][row*10+col].name}}</h3><br><br> <br><h3>{{tmp.challs[layer][row*10+col].name}}</h3><br><br>
<button v-bind:class="{ longUpg: true, can: true, [layer]: true }" v-bind:style="{'background-color': tmp.layerColor[layer]}" v-on:click="startChall(layer, row*10+col)">{{player[layer].active==(row*10+col)?(canCompleteChall(layer, row*10+col)?"Finish":"Exit Early"):(player[layer].challs.includes(row*10+col)?"Completed":"Start")}}</button><br><br> <button v-bind:class="{ longUpg: true, can: true, [layer]: true }" v-bind:style="{'background-color': tmp.layerColor[layer]}" v-on:click="startChall(layer, row*10+col)">{{player[layer].active==(row*10+col)?(canCompleteChall(layer, row*10+col)?"Finish":"Exit Early"):(player[layer].challs.includes(row*10+col)?"Completed":"Start")}}</button><br><br>
{{tmp.challs[layer][row*10+col].desc}}<br> {{tmp.challs[layer][row*10+col].desc}}<br>

View file

@ -468,4 +468,10 @@ ul {
filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100); filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1; opacity: 1;
white-space: pre-wrap; white-space: pre-wrap;
}
#loadingSection {
display: flex;
flex-direction: column;
justify-content: center;
} }