Skip to content

Commit 8029baf

Browse files
Add files via upload
1 parent d6d954a commit 8029baf

File tree

3 files changed

+93
-49
lines changed

3 files changed

+93
-49
lines changed

index.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,35 @@ <h1>Statistics</h1>
4949
<h1>Info</h1>
5050
<div class="content">
5151
<div>
52-
<h1>2.0.4 Released! (29/6/24)</h1>
53-
<p>- Bug Fixes</p>
52+
<h1>2.0.5 Released! <div class="date">(30/6/24)</div></h1>
53+
<p>- Minor UI changes</p>
54+
<p>- Several Bug fixes</p>
55+
</div>
56+
<div>
57+
<h1>2.0.4 Released! <div class="date">(29/6/24)</div></h1>
58+
<p>- Bug fixes</p>
5459
<p>- Nerfed upgrades</p>
5560
</div>
5661
<div>
57-
<h1>2.0.3 Released! (29/6/24)</h1>
62+
<h1>2.0.3 Released! <div class="date">(29/6/24)</div></h1>
5863
<p>- Added 3 new buildings!</p>
5964
<p>- Added the "Tree Floor"</p>
60-
<p>- Bug Fixes</p>
65+
<p>- Bug fixes</p>
6166
</div>
6267
<div>
63-
<h1>2.0.2 Released! (29/6/24)</h1>
64-
<p>- Bug Fixes</p>
68+
<h1>2.0.2 Released! <div class="date">(29/6/24)</div></h1>
69+
<p>- Bug fixes</p>
6570
</div>
6671
<div>
67-
<h1>2.0.1 Released! (29/6/24)</h1>
68-
<p>- Info Tab</p>
69-
<p>- Bug Fixes</p>
72+
<h1>2.0.1 Released! <div class="date">(29/6/24)</div></h1>
73+
<p>- Info tab</p>
74+
<p>- Bug fixes</p>
7075
</div>
7176
<div>
72-
<h1>2.0.0 Released! (29/6/24)</h1>
73-
<p>- New Buyable</p>
77+
<h1>2.0.0 Released! <div class="date">(29/6/24)</div></h1>
78+
<p>- New buyable</p>
7479
<p>- New UI</p>
75-
<p>- Bug Fixes</p>
80+
<p>- Bug fixes</p>
7681
<p>- Upgrades (to be worked on)</p>
7782
</div>
7883
</div>

main.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function l(what) {return document.getElementById(what);}
22

3-
Version = "2.0.4";
3+
Version = "2.0.5";
44
const versions = document.querySelectorAll("#version");
55

66
versions.forEach((e) => {
@@ -36,9 +36,17 @@ FractalEngines = 0;
3636

3737
Loaded = 0;
3838

39+
TreeClickAudio = new Audio("snd/click1.wav");
40+
BuyAudio = new Audio("snd/buy1.wav");
41+
3942
console.log('======== are you here to hack in trees? ========');
4043

4144
Beautify = function(what) {
45+
if (isNaN(what))
46+
return;
47+
if (what == Infinity)
48+
return Infinity;
49+
4250
var str='';
4351
what=Math.floor(what);
4452
what=(what+'').split('').reverse();
@@ -50,7 +58,7 @@ Beautify = function(what) {
5058
}
5159

5260
BeautifyShort = function (num) {
53-
var suffixes = ["", "K", "M", "B", "T", "Q", "Qi", "Sx", "Sp", "O", "N", "D", "UD", "DD", "TD", "QD", "Qa", "Qi", "Sx", "Sp", "Oc"];
61+
var suffixes = ["", "K", "M", "B", "T", "Q", "Qi", "Sx", "Sp", "O", "N", "D", "UD", "DD", "TD", "QD", "Qa", "Qi", "Sx", "Sp", "Oc", "No", "Ct", "St", "Nn", "Dc", "Ud", "Td", "Qt", "Qq"];
5462
var suffixIndex = 0;
5563

5664
num = Math.round(num);
@@ -69,7 +77,7 @@ TreeClick = function (e) {
6977
TotalTrees += CpS;
7078
TreeClicks++;
7179

72-
if (AudioEnabled) new Audio("snd/click1.wav").play();
80+
if (AudioEnabled) TreeClickAudio.play();
7381
new Pop("treeContainer", "+" + Beautify(CpS));
7482
}
7583

@@ -107,7 +115,7 @@ Buyable = function (name, desc, pic, price, tps, func) {
107115
this.price = Math.ceil(this.price * 1.1);
108116
this.func(1);
109117

110-
if (AudioEnabled) new Audio("snd/buy1.wav").play();
118+
if (AudioEnabled) BuyAudio.play();
111119

112120
StoreToRebuild = 1;
113121
}
@@ -264,7 +272,7 @@ Upgrade = function(name, desc, pic, price, mul, func) {
264272
Trees -= this.price;
265273
this.func(1);
266274
this.price = Math.ceil(this.price * this.mul);
267-
if (AudioEnabled) new Audio("snd/buy1.wav").play();
275+
if (AudioEnabled) BuyAudio.play();
268276

269277
UpgradesToRebuild = 1;
270278
}
@@ -387,7 +395,9 @@ MakeSaveString=function() {
387395
parseFloat(AlchemyLabs)+'|'+parseFloat(Buyables['Alchemy Lab'].price)+"|"+
388396
parseFloat(Portals)+'|'+parseFloat(Buyables['Portal'].price)+'|'+
389397
parseFloat(AntiMatters)+'|'+parseFloat(Buyables['Anti Matter'].price)+"|"+
390-
parseFloat(FractalEngines)+'|'+parseFloat(Buyables['Fractal Engine'].price);
398+
parseFloat(FractalEngines)+'|'+parseFloat(Buyables['Fractal Engine'].price)+"|"+
399+
parseFloat(Upgrades["Double CpS"].price)+"|"+
400+
parseFloat(Upgrades["Trees Increase"].price);
391401
return str;
392402
}
393403

@@ -412,7 +422,9 @@ LoadResponse=function(response) {
412422
AlchemyLabs = parseFloat(r[i]);i++; Buyables["Alchemy Lab"].price = parseFloat(r[i]);i++;
413423
Portals = parseFloat(r[i]);i++; Buyables["Portal"].price = parseFloat(r[i]);i++;
414424
AntiMatters = parseFloat(r[i]);i++; Buyables["Anti Matter"].price = parseFloat(r[i]);i++;
415-
FractalEngines = parseFloat(r[i]);i++; Buyables["Fractal Engine"].price = parseFloat(r[i]);
425+
FractalEngines = parseFloat(r[i]);i++; Buyables["Fractal Engine"].price = parseFloat(r[i]);i++;
426+
Upgrades["Double CpS"].price = parseFloat(r[i]);i++;
427+
Upgrades["Trees Increase"].price = parseFloat(r[i]);
416428

417429
StoreToRebuild=1;
418430
UpgradesToRebuild=1;

style.css

Lines changed: 57 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ body {
8282
font-size: 18px;
8383
background: rgba(0, 0, 0, 0.2);
8484
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
85-
z-index: 3;
85+
z-index: 4;
8686
text-align: center;
8787
}
8888

@@ -169,14 +169,15 @@ body {
169169
}
170170

171171
#store #buyables div b {
172-
font-size: 110%;
172+
font-size: 120%;
173173
font-weight: 900;
174174
}
175175

176176
#store #buyables div .amount {
177177
position: absolute;
178178
color: #555;
179-
font-size: 32px;
179+
font-size: 24px;
180+
font-weight: 500;
180181
top: 50%;
181182
transform: translateY(-50%);
182183
right: 32px;
@@ -206,8 +207,8 @@ moni {
206207

207208
#leftPanel #upgrades > div {
208209
position: relative;
209-
width: 64px;
210-
height: 64px;
210+
width: 48px;
211+
height: 48px;
211212
background: #333 no-repeat;
212213
background-size: cover;
213214
background-position: center;
@@ -254,28 +255,29 @@ moni {
254255
#navbar {
255256
position: absolute;
256257
left: 320px;
257-
padding: 16px;
258-
padding-top: 48px;
258+
padding-top: 34px;
259259
width: calc(100% - 640px);
260260
height: 100px;
261261
background: #222;
262262
display: flex;
263-
gap: 8px;
264263
justify-content: space-evenly;
264+
align-items: center;
265265
flex-direction: row;
266266
border-bottom: 1px solid #000;
267-
box-shadow: 0 2px 6px rgba(0,0,0,.6);
267+
box-shadow: 0 2px 6px #000;
268268
}
269269

270270
#navbar > div {
271271
color: #fff;
272272
background: #333;
273+
border: 1px solid #666;
273274
padding: 8px;
274-
border-radius: 8px;
275275
width: 100%;
276+
display: flex;
277+
justify-content: center;
278+
align-items: center;
276279
text-align: center;
277-
box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
278-
font-size: 16px;
280+
font-size: 14px;
279281
font-weight: 500;
280282
cursor: pointer;
281283
z-index: 3;
@@ -295,13 +297,14 @@ moni {
295297
height: calc(100vh - 100px);
296298
padding: 32px;
297299
top: 100px;
298-
z-index: 4;
300+
z-index: 5;
301+
overflow-y: auto;
299302
}
300303

301304
.modal h1 {
302-
color: #ccc;
303-
font-size: 24px;
304-
font-weight: 900;
305+
color: #fff;
306+
font-size: 32px;
307+
font-weight: 500;
305308
text-align: center;
306309
width: 100%;
307310
}
@@ -313,29 +316,53 @@ moni {
313316
gap: 16px;
314317
}
315318

319+
.modal#info .content > div {
320+
width: 100%;
321+
color: #fff;
322+
pointer-events: none;
323+
border-radius: 0px;
324+
background: #222;
325+
padding: 16px;
326+
}
327+
328+
.modal#info .content > div h1 {
329+
display: flex;
330+
align-items: center;
331+
justify-content: space-between;
332+
}
333+
334+
.modal#info .content > div h1 .date {
335+
font-size: 50%;
336+
color: #1ac;
337+
}
338+
339+
.modal#info .content > div p {
340+
font-size: 14px;
341+
font-weight: 500;
342+
}
343+
316344
.modal .content > div {
317345
width: 100%;
318346
color: #ccc;
319347
border: 1px solid #666;
320-
background: #333;
321-
border-radius: 8px;
348+
background: #222;
322349
padding: 8px;
323-
font-size: 16px;
324-
font-weight: 900;
325-
box-shadow: 0 2px 6px #000;
350+
font-size: 14px;
351+
font-weight: 500;
352+
box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
326353
text-align: center;
327354
cursor: pointer;
328355
}
329356

330357
.modal .content > div:hover {
331-
background: #444;
358+
background: #333;
332359
}
333360

334361
.modal .content > p {
335362
color: #fff;
336363
font-size: 16px;
337-
text-shadow: 0 2px 6px #000;
338-
font-weight: 900;
364+
text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
365+
font-weight: 500;
339366
}
340367

341368
.modal .content div h1 {
@@ -358,13 +385,13 @@ moni {
358385
}
359386

360387
.pop {
361-
font-weight: bold;
362-
color:#fff;
363-
width:200px;
364-
height:20px;
365-
font-size:20px;
388+
font-weight: 900;
389+
color: #fff;
390+
width: 200px;
391+
height: 20px;
392+
font-size: 20px;
366393
text-align: center;
367-
text-shadow:0px 0px 5px #000;
394+
text-shadow: 0px 2px 6px #000;
368395
}
369396

370397
#treeFloor {

0 commit comments

Comments
 (0)