mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-30 05:22:10 +00:00
Gagues are real
This commit is contained in:
parent
3a76dae4ad
commit
d4e38ba2f6
6 changed files with 80 additions and 2 deletions
|
@ -1,6 +1,12 @@
|
||||||
#The Modding Tree changelog:
|
#The Modding Tree changelog:
|
||||||
|
|
||||||
|
|
||||||
|
##v1.3.5
|
||||||
|
- Completely automated convertToDecimal, now you never have to worry about it again.
|
||||||
|
- Branches can be defined without a color id. But they can also use hex values for color ids!
|
||||||
|
- Created a tutorial for getting started with TMT and Github.
|
||||||
|
- Page title is now automatically taken from mod name.
|
||||||
|
|
||||||
##v1.3.4: 10/8/20
|
##v1.3.4: 10/8/20
|
||||||
- Added "midsection" feature to add things to a tab's layout while still keeping the standard layout.
|
- Added "midsection" feature to add things to a tab's layout while still keeping the standard layout.
|
||||||
- Fix for being able to buy more buyables than you should.
|
- Fix for being able to buy more buyables than you should.
|
||||||
|
|
|
@ -86,3 +86,9 @@ function readData(data, args=null){
|
||||||
else
|
else
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This isn't worth making a .ts file over
|
||||||
|
const UP = 1
|
||||||
|
const DOWN = 2
|
||||||
|
const LEFT = 3
|
||||||
|
const RIGHT = 4
|
23
js/layers.js
23
js/layers.js
|
@ -206,6 +206,29 @@ addLayer("c", {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
gagues: {
|
||||||
|
longBoi: {
|
||||||
|
fillColor:() => "#4BEC13",
|
||||||
|
// fillStyle:(),
|
||||||
|
baseColor:() => "#333333",
|
||||||
|
// baseStyle:(),
|
||||||
|
// textStyle:(),
|
||||||
|
|
||||||
|
borderStyle() {return {'border-color': '#321188'}},
|
||||||
|
direction:() => RIGHT,
|
||||||
|
width:() => "250px",
|
||||||
|
height:() => "250px",
|
||||||
|
progress() {
|
||||||
|
return (player.points.log().div(10))
|
||||||
|
},
|
||||||
|
display() {
|
||||||
|
return format(player.points) + " / 1e10"
|
||||||
|
},
|
||||||
|
unl:() => true,
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// Optional, lets you format the tab yourself by listing components. You can create your own components in v.js.
|
// Optional, lets you format the tab yourself by listing components. You can create your own components in v.js.
|
||||||
tabFormat: {
|
tabFormat: {
|
||||||
"main tab": {
|
"main tab": {
|
||||||
|
|
26
js/temp.js
26
js/temp.js
|
@ -30,6 +30,8 @@ function setupTemp(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateTemp() {
|
function updateTemp() {
|
||||||
|
for (layer in layers) tmp[layer] = {}
|
||||||
|
|
||||||
if (tmp.genPoints == undefined) tmp.genPoints = false
|
if (tmp.genPoints == undefined) tmp.genPoints = false
|
||||||
|
|
||||||
|
|
||||||
|
@ -143,6 +145,13 @@ function updateTemp() {
|
||||||
updateBuyableTemp(layer)
|
updateBuyableTemp(layer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (layer in layers) {
|
||||||
|
if(layers[layer].gagues !== undefined){
|
||||||
|
tmp[layer].gagues = {}
|
||||||
|
updateGagueTemp(layer)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -310,3 +319,20 @@ function setupBuyableTemp(layer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// The start of not being backwards with tmp
|
||||||
|
function updateGagueTemp(layer) {
|
||||||
|
if (layers[layer] === undefined) return
|
||||||
|
let gagues = layers[layer].gagues
|
||||||
|
for (id in gagues) {
|
||||||
|
tmp[layer].gagues[id] = {}
|
||||||
|
for (item in gagues[id]) {
|
||||||
|
let thing = gagues[id][item]
|
||||||
|
if (isFunction(thing))
|
||||||
|
tmp[layer].gagues[id] = thing()
|
||||||
|
else
|
||||||
|
tmp[layer].gagues[id] = thing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -414,3 +414,8 @@ var onFocused = false
|
||||||
function focused(x) {
|
function focused(x) {
|
||||||
onFocused = x
|
onFocused = x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isFunction(obj) {
|
||||||
|
return !!(obj && obj.constructor && obj.call && obj.apply);
|
||||||
|
};
|
||||||
|
|
12
js/v.js
12
js/v.js
|
@ -245,6 +245,18 @@ function loadVue() {
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// data = id of gague
|
||||||
|
Vue.component('gague', {
|
||||||
|
props: ['layer', 'data'],
|
||||||
|
template: `
|
||||||
|
<div v-if="layers[layer].gagues && tmp.gagues[layer][data].unl"
|
||||||
|
v-bind:style="{'border-style': 'solid}"
|
||||||
|
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// NOT FOR USE IN STANDARD TAB FORMATTING
|
// NOT FOR USE IN STANDARD TAB FORMATTING
|
||||||
Vue.component('tab-buttons', {
|
Vue.component('tab-buttons', {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue