mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-16 10:50:59 +00:00
It's a work in progress
This commit is contained in:
parent
66494e4ce2
commit
e8fee8a57d
10 changed files with 111 additions and 98 deletions
js
12
js/utils.js
12
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue