mirror of
https://github.com/thepaperpilot/the_ascension_tree.git
synced 2025-01-19 03:51:36 +00:00
Made red glow appear if the QoL upgrades are available
This commit is contained in:
parent
5c90cf9288
commit
81e8dc5c46
1 changed files with 3 additions and 1 deletions
|
@ -272,7 +272,9 @@ class Layer {
|
|||
|
||||
screenUpdate() {
|
||||
this.unlockReq.style.visibility = this.child_left === undefined || this.child_right === undefined ? "" : "hidden";
|
||||
let purchaseAvailable = Object.values(this.upgrades).some(upg => !upg.bought && upg.canBuy());
|
||||
let purchaseAvailable = Object.values(this.upgrades).some(upg => !upg.bought && upg.canBuy()) ||
|
||||
(this.parent_layer != undefined && this.child_left != undefined && this.child_left.points.gte(this.child_left.final_goal) && !this.left_branch) ||
|
||||
(this.parent_layer != undefined && this.child_right != undefined && this.child_right.points.gte(this.child_right.final_goal) && !this.right_branch);
|
||||
let ascensionAvailable = this.calculateProduction(0).eq(0) && this.prestigeGain().gt(0);
|
||||
this.nodeEl.className = `tree-node${ascensionAvailable ? ' ascensionAvailable' : ''}${purchaseAvailable ? ' purchaseAvailable' : ''}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue