Why isn't this layer unlocking?

So, I was planning to make some sort of meta-layer that would reset most things in the normal tree when you reset it, and I wanted it to be based off of how many upgrades you had. I wanted it to unlock when I had 10 upgrades. However, for some reason, after 12 upgrades it still isn’t unlocked.
Can somebody help me with this issue? Are there any bugs in the code that I should be aware of? Am I missing any code?

addLayer("p", {
  name: "prestige",
  symbol: "P",
  startData() { return {
    unlocked: false,
    points: new Decimal(0),
    total: new Decimal(0),
    best: new Decimal(0),
    resetTime: new Decimal(0),
  }},
  color: "#F7A",
  requires: new Decimal(10),
  resource: "prestige points",
  baseResource: "upgrades",
  baseAmount() {return new Decimal(player.f.upgrades.length)},
  hotkeys: [{key: "p", description: "P: Prestige, if possible", onPress(){if(canReset(this.layer)) doReset(this.layer)}},],
  layerShown(){return new Decimal(player.f.upgrades.length).gte(5) || player[this.layer].total.gte(1)},
  resetDescription: "Reset the normal tree and your size to get ",
  row: "side",
}),
2 Likes

What happens if you run player.f.upgrades.length in console?

3 Likes

Unfortunately, I only have access to my school’s computer (and a phone) right now, which means most developer features (specifically the console) are blocked. Are there any alternative ways to access the console / check without the console?

1 Like

If you can edit the code, you could have it display the value in some tabFormat somewhere, or in the thingsToDisplay array

2 Likes

A post was split to a new topic: My layer isn’t appearing