mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
Optimized presigeButtonText
This commit is contained in:
parent
87a32fbcce
commit
faebc2f075
3 changed files with 2 additions and 4 deletions
|
@ -208,7 +208,7 @@ function loadVue() {
|
|||
template: `
|
||||
<button v-if="(tmp[layer].type !== 'none')" v-bind:class="{ [layer]: true, reset: true, locked: !tmp[layer].canReset, can: tmp[layer].canReset}"
|
||||
v-bind:style="[tmp[layer].canReset ? {'background-color': tmp[layer].color} : {}, tmp[layer].componentStyles['prestige-button']]"
|
||||
v-html="tmp[layer].prestigeButtonText" v-on:click="doReset(layer)">
|
||||
v-html="prestigeButtonText(layer)" v-on:click="doReset(layer)">
|
||||
</button>
|
||||
`
|
||||
|
||||
|
|
|
@ -33,7 +33,6 @@ function setupTemp() {
|
|||
tmp[layer].canReset = {}
|
||||
tmp[layer].notify = {}
|
||||
tmp[layer].prestigeNotify = {}
|
||||
tmp[layer].prestigeButtonText = {}
|
||||
tmp[layer].computedNodeStyle = []
|
||||
setupBarStyles(layer)
|
||||
setupBuyables(layer)
|
||||
|
@ -84,7 +83,6 @@ function updateTemp() {
|
|||
tmp[layer].canReset = canReset(layer)
|
||||
tmp[layer].notify = shouldNotify(layer)
|
||||
tmp[layer].prestigeNotify = prestigeNotify(layer)
|
||||
tmp[layer].prestigeButtonText = prestigeButtonText(layer)
|
||||
constructBarStyles(layer)
|
||||
constructAchievementStyles(layer)
|
||||
constructNodeStyle(layer)
|
||||
|
|
|
@ -366,7 +366,7 @@ function focused(x) {
|
|||
|
||||
function prestigeButtonText(layer) {
|
||||
if (layers[layer].prestigeButtonText !== undefined)
|
||||
return layers[layer].prestigeButtonText()
|
||||
return run(layers[layer].prestigeButtonText(), layers[layer])
|
||||
else if (tmp[layer].type == "normal")
|
||||
return `${player[layer].points.lt(1e3) ? (tmp[layer].resetDescription !== undefined ? tmp[layer].resetDescription : "Reset for ") : ""}+<b>${formatWhole(tmp[layer].resetGain)}</b> ${tmp[layer].resource} ${tmp[layer].resetGain.lt(100) && player[layer].points.lt(1e3) ? `<br><br>Next at ${(tmp[layer].roundUpCost ? formatWhole(tmp[layer].nextAt) : format(tmp[layer].nextAt))} ${tmp[layer].baseResource}` : ""}`
|
||||
else if (tmp[layer].type == "static")
|
||||
|
|
Loading…
Reference in a new issue