Optimized some tooltips

This commit is contained in:
thepaperpilot 2021-06-27 17:07:13 -05:00
parent 096e7f928c
commit 6849b89706
3 changed files with 4 additions and 4 deletions

View file

@ -397,8 +397,8 @@ export default {
"prestige-button"() {return {'color': '#AA66AA'}}, "prestige-button"() {return {'color': '#AA66AA'}},
}, },
tooltip() { // Optional, tooltip displays when the layer is unlocked tooltip() { // Optional, tooltip displays when the layer is unlocked
let tooltip = formatWhole(player[this.layer].points) + " " + this.resource let tooltip = "{{ formatWhole(player.c.points) }} {{ layers.c.resource }}";
if (player[this.layer].buyables[11].gt(0)) tooltip += "<br><i><br><br><br>" + formatWhole(player[this.layer].buyables[11]) + " Exhancers</i>" if (player[this.layer].buyables[11].gt(0)) tooltip += "<br><i><br><br><br>{{ formatWhole(player.c.buyables[11]) }} Exhancers</i>"
return tooltip return tooltip
}, },
shouldNotify() { // Optional, layer will be highlighted on the tree if true. shouldNotify() { // Optional, layer will be highlighted on the tree if true.

View file

@ -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. 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 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: '<div><br/><img src="https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390" /><div>Bork Bork!</div></div>', midsection: '<div><br/><img src="https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390" /><div>Bork Bork!</div></div>',
// The following are only currently used for "custom" Prestige type: // The following are only currently used for "custom" Prestige type:

View file

@ -24,7 +24,7 @@ const g = {
const h = { const h = {
id: "h", id: "h",
branches: ["g", () => ({ target: 'flatBoi', featureType: 'bar', endOffset: { x: -50 + 100 * layers.c.bars.flatBoi.progress.toNumber() } })], 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", row: "side",
canClick() {return player.points.lt(player.c.otherThingy)}, canClick() {return player.points.lt(player.c.otherThingy)},
onClick() {player.points = new Decimal(player.c.otherThingy)} onClick() {player.points = new Decimal(player.c.otherThingy)}