From e8fee8a57d19512abe534fc8d519f61d0848e41e Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Fri, 30 Oct 2020 19:40:48 -0400 Subject: [PATCH] It's a work in progress --- .../2.0-format-changes.md | 0 demo.html | 80 +++---------------- index.html | 25 ------ js/Demo/demoTree.js | 2 +- js/components.js | 2 + js/game.js | 4 +- js/technical/layerSupport.js | 11 +++ js/technical/systemComponents.js | 61 +++++++++++++- js/utils.js | 12 ++- style.css | 12 +++ 10 files changed, 111 insertions(+), 98 deletions(-) rename 2.0-format-changes.md => Old Code/2.0-format-changes.md (100%) diff --git a/2.0-format-changes.md b/Old Code/2.0-format-changes.md similarity index 100% rename from 2.0-format-changes.md rename to Old Code/2.0-format-changes.md diff --git a/demo.html b/demo.html index df95e84..f7440a4 100644 --- a/demo.html +++ b/demo.html @@ -18,14 +18,14 @@ -
- +
+
-

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

+

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

-
-
+
+

{{modInfo.name}} {{VERSION.withoutName}}



Congratulations! You have reached the end and beaten this game, but for now...


@@ -43,66 +43,12 @@


Oh, you are still reading this?


-
-
-


-
+
-
-
-

{{modInfo.name}}

-
-

{{VERSION.withName}}

- -
- Made by {{modInfo.author}} -
-
- The Modding Tree {{TMT_VERSION.tmtNum}} by Acamaeda -
- The Prestige Tree made by Jacorb and Aarex -
- Original idea by papyrus (on discord) -

- Changelog
- {{modInfo.discordName}}
- 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. -

- Time Played: {{ formatTime(player.timePlayed) }}

-

Hotkeys


-
{{key.description}}
-
-
-
- - - - - - - - - - - - - - - - - - - - -
-
-
+
{{VERSION.withoutName}}
- -

i
+ +

i
- +
-
+




- +
-
+
diff --git a/index.html b/index.html index bf4a3e3..b597799 100644 --- a/index.html +++ b/index.html @@ -44,31 +44,6 @@
-
-

{{modInfo.name}}

-
-

{{VERSION.withName}}

- -
- Made by {{modInfo.author}} -
-
- The Modding Tree {{TMT_VERSION.tmtNum}} by Acamaeda -
- The Prestige Tree made by Jacorb and Aarex -
- Original idea by papyrus (on discord) -

- Changelog
- {{modInfo.discordName}}
- 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. -

- Time Played: {{ formatTime(player.timePlayed) }}

-

Hotkeys


-
{{key.description}}

diff --git a/js/Demo/demoTree.js b/js/Demo/demoTree.js index aee9601..7659b5c 100644 --- a/js/Demo/demoTree.js +++ b/js/Demo/demoTree.js @@ -1,6 +1,6 @@ // treeLayout will override the default tree's layout if used var layoutInfo = { - startTab: "none", + startTab: "c", showTree: true, //treeLayout: "" diff --git a/js/components.js b/js/components.js index ad8b1d7..4390cf8 100644 --- a/js/components.js +++ b/js/components.js @@ -403,6 +403,8 @@ function loadVue() { Vue.component('layer-node', systemComponents['layer-node']) Vue.component('layer-tab', systemComponents['layer-tab']) Vue.component('overlay-head', systemComponents['overlay-head']) + Vue.component('info-tab', systemComponents['info-tab']) + Vue.component('options-tab', systemComponents['options-tab']) app = new Vue({ diff --git a/js/game.js b/js/game.js index 560dd1c..bddb13d 100644 --- a/js/game.js +++ b/js/game.js @@ -349,7 +349,9 @@ var interval = setInterval(function() { } if (player.devSpeed) diff *= player.devSpeed player.time = now - if (needCanvasUpdate) resizeCanvas(); + if (needCanvasUpdate){ resizeCanvas(); + needCanvasUpdate = false; + } updateTemp(); gameLoop(diff) fixNaNs() diff --git a/js/technical/layerSupport.js b/js/technical/layerSupport.js index ec77831..517a901 100644 --- a/js/technical/layerSupport.js +++ b/js/technical/layerSupport.js @@ -197,3 +197,14 @@ const UP = 0 const DOWN = 1 const LEFT = 2 const RIGHT = 3 + + +addLayer("info-tab", { + tabFormat: ["info-tab"], + row: "otherside" +}) + +addLayer("options-tab", { + tabFormat: ["options-tab"], + row: "otherside" +}) \ No newline at end of file diff --git a/js/technical/systemComponents.js b/js/technical/systemComponents.js index 1b8072a..c9a078c 100644 --- a/js/technical/systemComponents.js +++ b/js/technical/systemComponents.js @@ -71,7 +71,7 @@ var systemComponents = { 'layer-tab': { props: ['layer', 'back', 'spacing'], template: `
-
+
@@ -127,4 +127,63 @@ var systemComponents = {
` }, + + 'info-tab': { + template: ` +
+

{{modInfo.name}}

+
+

{{VERSION.withName}}

+ +
+ Made by {{modInfo.author}} +
+
+ The Modding Tree {{TMT_VERSION.tmtNum}} by Acamaeda +
+ The Prestige Tree made by Jacorb and Aarex +
+ Original idea by papyrus (on discord) +

+ Changelog
+ {{modInfo.discordName}}
+ The Modding Tree Discord
+ Main Prestige Tree server
+

+ Time Played: {{ formatTime(player.timePlayed) }}

+

Hotkeys


+
{{key.description}}
+ ` + }, + + 'options-tab': { + template: ` + + + + + + + + + + + + + + + + + + + + +
` + }, + + 'back-button': { + template: ` + + ` + } } \ No newline at end of file diff --git a/js/utils.js b/js/utils.js index acd826e..cdb119e 100644 --- a/js/utils.js +++ b/js/utils.js @@ -84,7 +84,7 @@ function save() { function startPlayerBase() { return { tab: layoutInfo.startTab, - navTab: (layoutInfo.showTree ? "tree" : "none"), + navTab: (layoutInfo.showTree ? "tree-tab" : "none"), time: Date.now(), autosave: true, notify: {}, @@ -100,7 +100,6 @@ function startPlayerBase() { showStory: true, points: modInfo.initialStartPoints, subtabs: {}, - gameEnded:false } } @@ -118,6 +117,7 @@ function getStartPlayer() { playerdata[layer] = {} if (layers[layer].startData) playerdata[layer] = layers[layer].startData() + else playerdata[layer].unlocked = true playerdata[layer].buyables = getStartBuyables(layer) if(playerdata[layer].clickables == undefined) playerdata[layer].clickables = getStartClickables(layer) playerdata[layer].spentOnBuyables = new Decimal(0) @@ -603,6 +603,12 @@ function showTab(name) { player.tab = name delete player.notify[name] + needCanvasUpdate = true +} + +function goBack() { + if (player.navTab !== "none") showTab("none") + else showTab(layoutInfo.startTab) } function notifyLayer(name) { @@ -636,7 +642,7 @@ function layerunlocked(layer) { function keepGoing() { player.keepGoing = true; - showTab("tree") + needCanvasUpdate = true; } function toNumber(x) { diff --git a/style.css b/style.css index bf43998..ab17ab4 100644 --- a/style.css +++ b/style.css @@ -154,6 +154,18 @@ h1, h2, h3, b, input { cursor: pointer; } +.other-back { + position: absolute; + top: 10px; + left: 60px; + background-color: transparent; + border: 1px solid transparent; + color: var(--color); + font-size: 60px; + cursor: pointer; +} + + .back:hover { transform: scale(1.1, 1.1); text-shadow: 0px 0px 7px var(--color);