mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-11 12:31:08 +00:00
Added thing-tree
This commit is contained in:
parent
8ae89bd098
commit
dde4c00276
6 changed files with 19 additions and 6 deletions
|
@ -11,7 +11,7 @@ let modInfo = {
|
|||
|
||||
// Set your version in num and name
|
||||
let VERSION = {
|
||||
num: "2.6.0.1",
|
||||
num: "2.6.1",
|
||||
name: "Fixed Reality",
|
||||
}
|
||||
|
||||
|
|
|
@ -510,16 +510,26 @@ function loadVue() {
|
|||
computed: {
|
||||
key() {return this.$vnode.key}
|
||||
},
|
||||
template: `<thing-tree :layer="layer" :data = "data" :type = "'upgrade'"></thing-tree>`
|
||||
})
|
||||
|
||||
// Data is an array with the structure of the tree
|
||||
Vue.component('thing-tree', {
|
||||
props: ['layer', 'data', 'type'],
|
||||
computed: {
|
||||
key() {return this.$vnode.key}
|
||||
},
|
||||
template: `<div>
|
||||
<span class="upgRow" v-for="(row, r) in data"><table>
|
||||
<span v-for="id in row" style = "{width: 0px; height: 0px;}" v-if="tmp[layer].upgrades[id]!== undefined && tmp[layer].upgrades[id].unlocked" class="upgAlign">
|
||||
<upgrade :layer = "layer" :data = "id" v-bind:style="tmp[layer].componentStyles.upgrade" class = "treeThing"></upgrade>
|
||||
<span v-for="id in row" style = "{width: 0px; height: 0px;}" v-if="tmp[layer][type+'s'][id]!== undefined && tmp[layer][type+'s'][id].unlocked" class="upgAlign">
|
||||
<div v-bind:is="type" :layer = "layer" :data = "id" v-bind:style="tmp[layer].componentStyles[type]" class = "treeThing"></div>
|
||||
</span>
|
||||
<tr><table><button class="treeNode hidden"></button></table></tr>
|
||||
</span></div>
|
||||
`
|
||||
})
|
||||
|
||||
|
||||
// Updates the value in player[layer][data]
|
||||
Vue.component('text-input', {
|
||||
props: ['layer', 'data'],
|
||||
|
|
|
@ -4,7 +4,7 @@ var gameEnded = false;
|
|||
|
||||
// Don't change this
|
||||
const TMT_VERSION = {
|
||||
tmtNum: "2.6.0.1",
|
||||
tmtNum: "2.6.1",
|
||||
tmtName: "Fixed Reality"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue