From 9a01a2931b98c5a87f478208ac9ed30ecb4e341e Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 4 Sep 2021 20:42:59 -0500 Subject: [PATCH] Fixed issue with demo layer working incorrectly --- src/data/layers/demo.ts | 28 ++++++++++++++-------------- src/game/layers.ts | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/data/layers/demo.ts b/src/data/layers/demo.ts index 0626f3f..555dda6 100644 --- a/src/data/layers/demo.ts +++ b/src/data/layers/demo.ts @@ -1932,7 +1932,7 @@ export default { return getBuyableAmount("p", 11)!.gte(1); }, unlocked() { - return layers.p.activeSubtab?.id == "Pointy points"; + return layers.p.activeSubtab?.id != "Pointy points"; } }, 1: { @@ -1945,7 +1945,7 @@ export default { unlocked() { return ( hasMilestone(this.layer, Number(this.id) - 1) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -1959,7 +1959,7 @@ export default { unlocked() { return ( hasMilestone(this.layer, Number(this.id) - 1) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -1973,7 +1973,7 @@ export default { unlocked() { return ( hasMilestone(this.layer, Number(this.id) - 1) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -1986,7 +1986,7 @@ export default { unlocked() { return ( hasMilestone(this.layer, Number(this.id) - 1) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -1999,7 +1999,7 @@ export default { unlocked() { return ( hasMilestone(this.layer, Number(this.id) - 1) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -2013,7 +2013,7 @@ export default { return ( hasMilestone(this.layer, Number(this.id) - 1) && (hasUpgrade(this.layer, 104) || player.layers.i.unlocked) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -2028,7 +2028,7 @@ export default { return ( hasMilestone(this.layer, Number(this.id) - 1) && (hasUpgrade(this.layer, 111) || player.layers.i.unlocked) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -2045,7 +2045,7 @@ export default { hasUpgrade(this.layer, 143) || hasUpgrade(this.layer, 142) || player.layers.i.unlocked) && - layers.p.activeSubtab?.id == "Pointy points" + layers.p.activeSubtab?.id != "Pointy points" ); } }, @@ -2268,19 +2268,19 @@ export default { return hasUpgrade("p", 104) || player.layers.i.points.gte(1); }, display: ` -
{{ format(player.layers.p.buyables![21]) }} pointy points
-
My pointy points are multiplying generator efficiency by {{ format(new Decimal(player.layers.p.buyables![21]).plus(1)) }}
+
{{ format(player.layers.p.buyables[21]) }} pointy points
+
My pointy points are multiplying generator efficiency by {{ format(new Decimal(player.layers.p.buyables[21]).plus(1)) }}
-
I have {{ format(player.layers.p.buyables![22]) }} pointy prestige points
+
I have {{ format(player.layers.p.buyables[22]) }} pointy prestige points
-
I have {{ format(player.layers.p.buyables![23]) }} pointy boosters!
+
I have {{ format(player.layers.p.buyables[23]) }} pointy boosters!
-
My pointy boosters are raising generator efficiency to the ^{{ format(new Decimal(player.layers.p.buyables![23]).div(10).mul(new Decimal(0.1).plus(layers.p.buyables[41].effect).times(10)).plus(1)) }}
+
My pointy boosters are raising generator efficiency to the ^{{ format(new Decimal(player.layers.p.buyables[23]).div(10).mul(new Decimal(0.1).plus(layers.p.buyables[41].effect).times(10)).plus(1)) }}
Booster upgrades
diff --git a/src/game/layers.ts b/src/game/layers.ts index 4eaa4d6..2b91139 100644 --- a/src/game/layers.ts +++ b/src/game/layers.ts @@ -617,7 +617,7 @@ function setRowCol, S extends Feature>(features: RawGr } let maxRow = 0; let maxCol = 0; - for (const id in features) { + for (const id in features.data) { const index = Number(id); if (!isNaN(index)) { if (Math.floor(index / 10) > maxRow) {