1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Added non-whole numbers to mainDisplay

This commit is contained in:
Harley White 2021-05-11 22:29:05 -04:00
parent 13d19700fe
commit 919da6c953
4 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,8 @@
# The Modding Tree changelog:
- Added grids! Description not ready
- Added the ability to display non-whole numbers in main-display.
# v2.5.4 - 5/10/21
- Added a setting to always use single-tab mode.
- Added directMult, which multiplies prestige gain after exponents and softcaps. It actually multiplies gain for static layers.

View file

@ -35,7 +35,7 @@ These are the existing components, but you can create more in [components.js](/j
- column: Display a list of components vertically. The argument is an array of components in the tab layout format. This is useful to display columns within a row.
- main-display: The text that displays the main currency for the layer and its effects.
- main-display: The text that displays the main currency for the layer and its effects. The argument is the amount of precision to use, allowing it to display non-whole numbers.
- resource-display: The text that displays the currency that this layer is based on, as well as the best and/or total values for this layer's prestige currency (if they are put in `startData` for this layer).

View file

@ -544,7 +544,7 @@ addLayer("a", {
player[this.layer].grid[id]++
},
getTitle(data, id) {
return "#" + id
return "Gridable #" + id
},
getDisplay(data, id) {
return data

View file

@ -217,9 +217,9 @@ function loadVue() {
// Displays the main resource for the layer
Vue.component('main-display', {
props: ['layer'],
props: ['layer', 'data'],
template: `
<div><span v-if="player[layer].points.lt('1e1000')">You have </span><h2 v-bind:style="{'color': tmp[layer].color, 'text-shadow': '0px 0px 10px ' + tmp[layer].color}">{{formatWhole(player[layer].points)}}</h2> {{tmp[layer].resource}}<span v-if="layers[layer].effectDescription">, <span v-html="run(layers[layer].effectDescription, layers[layer])"></span></span><br><br></div>
<div><span v-if="player[layer].points.lt('1e1000')">You have </span><h2 v-bind:style="{'color': tmp[layer].color, 'text-shadow': '0px 0px 10px ' + tmp[layer].color}">{{data ? format(player[layer].points, data) : formatWhole(player[layer].points)}}</h2> {{tmp[layer].resource}}<span v-if="layers[layer].effectDescription">, <span v-html="run(layers[layer].effectDescription, layers[layer])"></span></span><br><br></div>
`
})