1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 08:12:39 +00:00

Locked challenges cannot be entered

This commit is contained in:
Harley White 2021-07-07 13:08:34 -04:00
parent 95b9965c62
commit 5e9d4ea53e
3 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,7 @@
- Fixed formatting for small negative numbers.
- Fixed divide by zero when a 0-second tick occurs.
- "deactivated" now also affects achievement/milestone unlocking.
- Locked challenges cannot be entered.
# v2.6.4.2 - 6/17/21
- Fixed a bug with the endgame screen.

View file

@ -274,7 +274,7 @@ function loadVue() {
props: ['layer', 'data', 'size'],
template: `
<div v-if="tmp[layer].buyables && tmp[layer].buyables[data]!== undefined && tmp[layer].buyables[data].unlocked" style="display: grid">
<button v-bind:class="{ buyable: true, tooltipBox: true, can: tmp[layer].buyables[data].canBuy, locked: !tmp[layer].buyables[data].canAfford, bought: player[layer].buyables[data].gte(tmp[layer].buyables[data].purchaseLimit)}"
<button v-bind:class="{ buyable: true, tooltipBox: true, can: tmp[layer].buyables[data].canBuy, locked: !tmp[layer].buyables[data].canBuy, bought: player[layer].buyables[data].gte(tmp[layer].buyables[data].purchaseLimit)}"
v-bind:style="[tmp[layer].buyables[data].canBuy ? {'background-color': tmp[layer].color} : {}, size ? {'height': size, 'width': size} : {}, tmp[layer].componentStyles.buyable, tmp[layer].buyables[data].style]"
v-on:click="if(!interval) buyBuyable(layer, data)" :id='"buyable-" + layer + "-" + data' @mousedown="start" @mouseleave="stop" @mouseup="stop" @touchstart="start" @touchend="stop" @touchcancel="stop">
<span v-if= "tmp[layer].buyables[data].title"><h2 v-html="tmp[layer].buyables[data].title"></h2><br></span>

View file

@ -245,7 +245,7 @@ function resetRow(row) {
function startChallenge(layer, x) {
let enter = false
if (!player[layer].unlocked) return
if (!player[layer].unlocked || !tmp[layer].challenges[x].unlocked) return
if (player[layer].activeChallenge == x) {
completeChallenge(layer, x)
Vue.set(player[layer], "activeChallenge", null)