1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-25 09:51:54 +00:00
The-Modding-Tree/js/v.js

72 lines
1.3 KiB
JavaScript
Raw Normal View History

2020-08-19 02:50:24 +00:00
var app;
function loadVue() {
2020-09-11 02:15:05 +00:00
Vue.component('layer-node', {
props: ['layer', 'abb'],
template: `
<button v-if="nodeShown(layer)"
v-bind:id="layer"
v-on:click="function() {
showTab(layer)
}"
v-bind:tooltip="
layerUnl(layer) ? formatWhole(player[layer].points) + ' ' + LAYER_RES[layer]
: 'Reach ' + formatWhole(tmp.layerReqs[layer]) + ' ' + LAYER_AMT_NAMES[layer] + ' to unlock (You have ' + formatWhole(tmp.layerAmt[layer]) + ' ' + LAYER_AMT_NAMES[layer] + ')'
"
v-bind:class="{
treeNode: true,
[layer]: true,
hidden: !layerShown(layer),
locked: !layerUnl(layer),
can: layerUnl(layer)
}">
{{abb}}
</button>
`
})
2020-08-19 02:50:24 +00:00
app = new Vue({
2020-09-11 02:15:05 +00:00
el: "#app",
data: {
player,
tmp,
offTime,
Decimal,
format,
formatWhole,
formatTime,
focused,
layerUnl,
getLayerEffDesc,
doReset,
buyUpg,
getEnhancerCost,
getExtCapsuleCost,
getSpace,
getSpaceBuildingsUnl,
getSpaceBuildingCost,
getSpaceBuildingEffDesc,
buyBuilding,
getQuirkLayerCost,
buyQuirkLayer,
startHindrance,
HCActive,
milestoneShown,
destroyBuilding,
getSpellDesc,
activateSpell,
spellActive,
updateToCast,
keepGoing,
LAYERS,
LAYER_RES,
LAYER_TYPE,
LAYER_UPGS,
LAYER_EFFS,
LAYER_AMT_NAMES,
LAYER_RES_CEIL,
H_CHALLS,
SPELL_NAMES,
LIFE_BOOSTERS
},
2020-08-19 02:50:24 +00:00
})
}