1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-04-30 21:42:10 +00:00

Updated docs with tree things, other fixes

This commit is contained in:
Acamaeda 2020-11-07 15:29:39 -05:00
parent 2c0822b43e
commit 35e3eaea89
12 changed files with 75 additions and 17 deletions

View file

@ -484,7 +484,7 @@ function upgradeEffect(layer, id){
}
function challengeEffect(layer, id){
return (tmp[layer].challenges[id].effect)
return (tmp[layer].challenges[id].rewardEffect)
}
function buyableEffect(layer, id){
@ -586,7 +586,7 @@ function clickClickable(layer, id) {
// Function to determine if the player is in a challenge
function inChallenge(layer, id){
let challenge = player[layer].activeChallenge
if (challenge == null) return
if (!challenge) return false
id = toNumber(id)
if (challenge==id) return true
@ -607,6 +607,16 @@ function showTab(name) {
needCanvasUpdate = true
}
function showNavTab(name) {
if (LAYERS.includes(name) && !layerunlocked(name)) return
var toTreeTab = name == "tree"
player.navTab = name
player.notify[name] = false
needCanvasUpdate = true
}
function goBack() {
if (player.navTab !== "none") showTab("none")
else showTab(player.lastSafeTab)