forked from Jacorb90/Prestige-Tree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
210 lines (201 loc) · 13.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<head>
<link id="styleStuff" rel="stylesheet" type="text/css" href="style.css" />
<link rel="stylesheet" type="text/css" href="notification.css" />
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script type="text/javascript" src="js/technical/break_eternity.js"></script>
<script type="text/javascript" src="js/technical/layerSupport.js"></script>
<script type="text/javascript" src="js/tree.js"></script>
<script type="text/javascript" src="js/sc.js"></script>
<script type="text/javascript" src="js/help.js"></script>
<script type="text/javascript" src="js/layers.js"></script>
<script type="text/javascript" src="js/mod.js"></script>
<script type="text/javascript" src="js/technical/temp.js"></script>
<script type="text/javascript" src="js/game.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/technical/systemComponents.js"></script>
<script type="text/javascript" src="js/components.js"></script>
<script type="text/javascript" src="js/technical/canvas.js"></script>
</head>
<body onload="load()">
<div id="app">
<canvas id="treeCanvas" class="canvas" v-if ="!(gameEnded && !player.keepGoing)"></canvas>
<div v-if="false" id="loadingSection" class="fullWidth">
<h1>Loading...<br></h1><br>If this takes too long, please let me know in <a style="font-size: 30px" href="https://discord.gg/ww5NQutTRK">my discord</a>.
</div>
<div v-bind:style="{display: 'block'}" style="display: none;">
<div class="vl" v-if="player.navTab!= 'none' &&player.tab!='none'&&!(gameEnded && !player.keepGoing)"></div>
<div v-if="(gameEnded && !player.keepGoing)" class="fullWidth">
<br>
<h2>{{modInfo.name}} {{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 if there are new content updates!</h3><br><br>
<div v-if="!player.timePlayedReset">It took you {{formatTime(player.timePlayed)}} to beat the game.</div>
<div v-if="player.timePlayedReset">Make sure that you record the time in your stream or else your speedrun won't count!</div>
<br>
<button class="longUpg can" onclick="hardReset(true)">Play Again</button> <button class="longUpg can" onclick="keepGoing()">Keep Going</button>
<br><br><br>
<a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">The Prestige Tree Discord</a><br>
<a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><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.
<br><br><br>
</div>
<!-- Notifications -->
<div class="notification-container">
<transition-group name="fade">
<div v-for="notification,index in activeNotifications" class="notification" v-bind:class="notification.type" v-bind:key="notification.id">
<h3>{{notification.title}}</h3><br>
<h2 v-html="notification.message"></h2>
</div>
</transition-group>
</div>
<div v-if="player.tab=='info'" class="col right">
<button class="back" onclick="showTab('none')">←</button><br>
<h2>{{modInfo.name}}</h2>
<br>
<h3>{{VERSION.withName}}</h3>
<span v-if="modInfo.author">
<br>
Made by {{modInfo.author}}
</span>
<br>
The Modding Tree {{TMT_VERSION.tmtNum}} by Acamaeda
<br>
Original idea by papyrus#6977 (on discord)
<br><br>
Note: 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 make sure that the credit shown above is kept in-game.<br><br>
<a v-bind:href="modInfo.changelogLink" target="_blank" class="link" >Changelog</a><br>
<a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">The Prestige Tree Discord</a><br>
<a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><br>
<a class="link pat" href="http://patreon.com/Jacorb90" target="_blank" v-bind:style="{'font-size': '18px'}">Donate</a><br>
<br><br>
Time Played: {{ formatTime(player.timePlayed) }}<br>
<span v-for="layer in LAYERS"><span v-if="player[layer].first!==undefined && player[layer].unlocked">First {{layer}} reset: {{formatTime(player[layer].first)}}<br></span></span><br>
<h3>Hotkeys</h3><br>
<span v-for="key in hotkeys" v-if="player[key.layer].unlocked"><br>{{key.description}}</span>
<br>Press - to Show Formulas
</div>
<div v-if="player.tab=='help' && (typeof help_data != 'undefined')" class="col right">
<div v-if="typeof tmp.helpTab == 'number'">
<button class="back" onclick="showTab('none')">←</button><br>
<div v-if="player.a.achievements.length==0">Why are you even here? You haven't started yet!</div>
<ul v-else><br><br><br><li v-for="data in tmp.helpData"><a v-if="data.unlocked" class="link" v-on:click="tmp.helpTab = data.id" v-html="data.title"></a><br></li></ul>
</div>
<div v-else>
<button class="back" onclick="tmp.helpTab = NaN">←</button><br>
<h2 v-html="tmp.helpData[tmp.helpTab].title"></h2><br><br>
<div v-html="tmp.helpData[tmp.helpTab].text"></div>
</div>
</div>
<div v-if="player.tab=='options'" class="col right">
<button class="back" onclick="showTab('none')">←</button><br>
<div class="upgTable" style="padding-top: 25px; margin-bottom: 24px;">
<div class="upgRow">
<div><button class="tabButton" style="border-color: white;" v-on:click="player.optTab='mainOpt'">Main Options</button></div>
<div><button class="tabButton" style="border-color: white;" v-on:click="player.optTab='displayOpt'">Display Options</button></div>
<div><button class="tabButton" style="border-color: white;" v-on:click="player.optTab='notifyOpt'">Node Glow Options</button></div>
</div>
</div>
<div v-if="player.optTab=='mainOpt'">
<table>
<tr>
<td><button class="opt" onclick="save()">Save</button></td>
<td><button class="opt" onclick="toggleOpt('autosave')">Autosave: {{ player.autosave?"ON":"OFF" }}</button></td>
<td><button class="opt" onclick="hardReset()">HARD RESET</button></td>
</tr>
<tr>
<td><button class="opt" onclick="exportSave()">Export to clipboard</button></td>
<td><button class="opt" onclick="importSave()">Import</button></td>
<td><button class="opt" onclick="toggleOpt('offlineProd')">Offline Prod: {{ player.offlineProd?"ON":"OFF" }}</button></td>
</tr>
<tr>
<td><button class="opt" onclick="showAllSaves()">All Save Files</button></td>
<td><button class="opt" onclick="toggleOpt('tapNerd')">"Nerd Mode" Activation: {{player.tapNerd?"ON TAP":"ON HOLD"}}</button></td>
<td></td>
</tr>
</table>
</div><div v-if="player.optTab=='displayOpt'">
<table>
<tr>
<td><button class="opt" onclick="switchTheme()">Theme: {{ getThemeName() }}</button></td>
<td><button class="opt" onclick="toggleOpt('oldStyle')">Style: {{ player.oldStyle?"v1.0":"NEW" }}</button></td>
<td><button v-bind:class="{opt: true, locked: player.oldStyle}" onclick="if (!player.oldStyle) toggleOpt('hqTree')">High-Quality Tree: {{ (player.hqTree&&!player.oldStyle)?"ON":"OFF" }}</button></td>
</tr>
<tr>
<td><button v-bind:class="{opt: true, locked: player.oldStyle}" onclick="if (!player.oldStyle) toggleOpt('grad')">Gradients: {{ (player.grad&&!player.oldStyle)?"ON":"OFF" }}</button></td>
<td><button class="opt" onclick="adjustMSDisp()">Show Milestones: {{ player.msDisplay.toUpperCase() }}</button></td>
<td><button class="opt" onclick="toggleOpt('milNotify')">Milestone Notifications: {{ player.milNotify?"ON":"OFF" }}</button></td>
</tr>
<tr>
<td><button v-bind:class="{opt: true, locked: player.oldStyle}" onclick="if (!player.oldStyle) toggleOpt('anim')">Animations: {{ (player.anim&&!player.oldStyle)?"ON":"OFF" }}</button></td>
<td><button class="opt" onclick="toggleOpt('hideChallenges')">Completed Challenges: {{ player.hideChallenges?"HIDDEN":"SHOWN" }}</button></td>
<td><button v-if="hasAchievement('a', 21)" class="opt" onclick="toggleOpt('scShown')">Softcap Node: {{player.scShown?"SHOWN":"HIDDEN"}}</button></td>
</tr>
<tr>
<td><button v-if="player.ma.unlocked" class="opt" onclick="toggleOpt('hideStars')">Mastery Stars: {{ player.hideStars?"HIDDEN":"SHOWN" }}</button></td>
</tr>
</table>
</div><div v-if="player.optTab=='notifyOpt'">
<table>
<tr>
<td><button class="opt" onclick="adjustGlow('slight')">White Glow: {{ player.slightGlow.toUpperCase() }}</button></td>
<td><button class="opt" onclick="toggleOpt('redGlowActive')">Red Glow: {{ player.redGlowActive?"ON":"OFF" }}</button></td>
<td><button v-if="player.s.unlocked" class="opt" onclick="adjustGlow('space')">Red Glow - Space Buildings: {{ player.spaceGlow.toUpperCase() }}</button></td>
</tr>
<tr>
<td><button v-if="player.o.unlocked" class="opt" onclick="adjustGlow('sol')">Red Glow - Solarity Buyables: {{ player.solGlow.toUpperCase() }}</button></td>
<td><button v-if="player.m.unlocked" class="opt" onclick="adjustGlow('maj')">Red Glow - Spells: {{ player.majGlow.toUpperCase() }}</button></td>
<td><button v-if="player.mc.unlocked" class="opt" onclick="toggleOpt('shellGlow')">Red Glow - Shell Expansion: {{ player.shellGlow?"ON":"OFF" }}</button></td>
</tr>
</table>
</div><br><br>
<saves></saves>
</div>
<div id="treeOverlay" class="treeOverlay" v-if="player.tab!='gameEnded'" v-bind:class="{ fullWidth: (player.tab == 'tree' || player.tab == 'none'), col: (player.tab != 'tree' && player.tab != 'none'), left: (player.tab != 'tree' && player.tab != 'none')}">
<div id="version" class="overlayThing" style="margin-right: 25px">{{VERSION.withoutName}}</div>
<img id="optionWheel" class="overlayThing" v-if="player.tab!='options'" src="images/options_wheel.png" onclick="showTab('options')"></img>
<div id="info" v-if="player.tab!='info'" class="overlayThing" onclick="showTab('info')"><br>i</div>
<div id="help" v-if="player.tab!='help' && (typeof help_data != 'undefined')" class="overlayThing" onclick="showTab('help')"><br>?</div>
<div id="discord" class="overlayThing">
<img onclick="window.open((modInfo.discordLink ? modInfo.discordLink : 'http://discord.gg/wwQfgPa'),'mywindow')" src="images/discord.png" target="_blank"></img>
<ul id="discord-links">
<li><a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">Prestige Tree Discord</a></li>
<li><a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><br></li>
</ul>
</div>
<div class="overlayThing" style="padding-bottom:7px; width: 90%;">
<span v-if="player.devSpeed && player.devSpeed != 1" class="overlayThing">
<br>Dev Speed: {{format(player.devSpeed)}}x<br>
</span>
<span v-if="player.offTime !== undefined && player.offTime !== null" class="overlayThing">
<br>Offline Time: {{formatTime(player.offTime?player.offTime.remain:0)}}<br>
</span>
<span v-if="!player.keepGoing" class="overlayThing">
<br><span v-if="modInfo.specialEndgameText">{{modInfo.specialEndgameText}}</span><span v-if="!modInfo.specialEndgameText">Reach {{formatWhole(modInfo.endgame)+" "+modInfo.pointsName}} to beat the game!</span><br>
</span>
<br>
<span v-if="player.points.lt('1e1000')">You have </span>
<h2 id="points">{{format(player.points)}}</h2>
<span v-if="player.points.lt('1e1e6')"> {{modInfo.pointsName}}</span>
<br>
<span v-if="canGenPoints()">({{format(getPointGen())}}/sec)</span>
<div v-for="thing in tmp.displayThings"><span v-if="thing" v-html="thing"></span></div>
</div>
<div class="sideLayers" >
<div v-for="node in OTHER_LAYERS['side']"><layer-node :layer='node' :abb='tmp[node].symbol' :size="'small'"></layer-node><br><button class='smallNode hidden'></button></div>
</div>
</div>
<div v-if="!(gameEnded && !player.keepGoing)" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
<br><br><br><br><br><br>
<overlay-head id="fakeHead" style="visibility: hidden;">
</overlay-head>
<layer-tab :layer="player.navTab == 'none' ? player.tab : player.navTab"></layer-tab>
</div>
<div v-if="(player.navTab !== 'none' && player.tab !== 'tree' && LAYERS.includes(player.tab)) && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
<layer-tab :layer="player.tab" :back="'tree'" :spacing="'50px'"></layer-tab>
</div>
</div>
</div>
</body>