From 6849b89706282c146f01b46b7fd8e44fa26a4f88 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 27 Jun 2021 17:07:13 -0500 Subject: [PATCH] Optimized some tooltips --- src/data/layers/aca/c.js | 4 ++-- src/data/layers/aca/f.js | 2 +- src/data/mod.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/data/layers/aca/c.js b/src/data/layers/aca/c.js index 063928b..c14cceb 100644 --- a/src/data/layers/aca/c.js +++ b/src/data/layers/aca/c.js @@ -397,8 +397,8 @@ export default { "prestige-button"() {return {'color': '#AA66AA'}}, }, tooltip() { // Optional, tooltip displays when the layer is unlocked - let tooltip = formatWhole(player[this.layer].points) + " " + this.resource - if (player[this.layer].buyables[11].gt(0)) tooltip += "



" + formatWhole(player[this.layer].buyables[11]) + " Exhancers
" + let tooltip = "{{ formatWhole(player.c.points) }} {{ layers.c.resource }}"; + if (player[this.layer].buyables[11].gt(0)) tooltip += "



{{ formatWhole(player.c.buyables[11]) }} Exhancers
" return tooltip }, shouldNotify() { // Optional, layer will be highlighted on the tree if true. diff --git a/src/data/layers/aca/f.js b/src/data/layers/aca/f.js index c0fc0eb..99c801d 100644 --- a/src/data/layers/aca/f.js +++ b/src/data/layers/aca/f.js @@ -36,7 +36,7 @@ export default { branches: [{ target: "c", 'stroke-width': '25px', 'stroke': 'blue', style: 'filter: blur(5px)' }], // When this layer appears, a branch will appear from this layer to any layers here. Each entry can be a pair consisting of a layer id and a color. tooltipLocked() { // Optional, tooltip displays when the layer is locked - return ("This weird farmer dinosaur will only see you if you have at least " + this.requires + " points. You only have " + formatWhole(player.points)) + return ("This weird farmer dinosaur will only see you if you have at least {{layers.f.requires}} points. You only have {{ formatWhole(player.points) }}") }, midsection: '

Bork Bork!
', // The following are only currently used for "custom" Prestige type: diff --git a/src/data/mod.js b/src/data/mod.js index b412ecc..8f87448 100644 --- a/src/data/mod.js +++ b/src/data/mod.js @@ -24,7 +24,7 @@ const g = { const h = { id: "h", branches: ["g", () => ({ target: 'flatBoi', featureType: 'bar', endOffset: { x: -50 + 100 * layers.c.bars.flatBoi.progress.toNumber() } })], - tooltip() {return "Restore your points to " + player.c.otherThingy}, + tooltip() {return "Restore your points to {{ player.c.otherThingy }}"}, row: "side", canClick() {return player.points.lt(player.c.otherThingy)}, onClick() {player.points = new Decimal(player.c.otherThingy)}