mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-11 04:21:09 +00:00
Added drop-down
This commit is contained in:
parent
cd71349fd5
commit
e7b0af397d
9 changed files with 30 additions and 11 deletions
|
@ -15,6 +15,7 @@ addLayer("c", {
|
|||
beep: false,
|
||||
thingy: "pointy",
|
||||
otherThingy: 10,
|
||||
drop: "drip",
|
||||
}},
|
||||
color: "#4BDC13",
|
||||
requires: new Decimal(10), // Can be a function that takes requirement increases into account
|
||||
|
@ -221,7 +222,7 @@ addLayer("c", {
|
|||
microtabs: {
|
||||
stuff: {
|
||||
first: {
|
||||
content: ["upgrades", ["display-text", function() {return "confirmed"}]]
|
||||
content: ["upgrades", ["display-text", function() {return "confirmed<br>" + player.c.drop}], ["drop-down", ["drop", ["drip", "drop"]]]]
|
||||
},
|
||||
second: {
|
||||
embedLayer: "f",
|
||||
|
|
|
@ -11,7 +11,7 @@ let modInfo = {
|
|||
|
||||
// Set your version in num and name
|
||||
let VERSION = {
|
||||
num: "2.5.12",
|
||||
num: "2.6",
|
||||
name: "Dreams Really Do Come True",
|
||||
}
|
||||
|
||||
|
|
|
@ -515,7 +515,7 @@ function loadVue() {
|
|||
`
|
||||
})
|
||||
|
||||
// Updates the value in player[layer][data]
|
||||
// Updates the value in player[layer][data][0]
|
||||
Vue.component('slider', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
|
@ -524,6 +524,15 @@ function loadVue() {
|
|||
`
|
||||
})
|
||||
|
||||
// Updates the value in player[layer][data[0]], options are an array in data[1]
|
||||
Vue.component('drop-down', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<select v-model="player[layer][data[0]]">
|
||||
<option v-for="item in data[1]" v-bind:value="item">{{item}}</option>
|
||||
</select>
|
||||
`
|
||||
})
|
||||
// These are for buyables, data is the id of the corresponding buyable
|
||||
Vue.component('sell-one', {
|
||||
props: ['layer', 'data'],
|
||||
|
@ -599,6 +608,8 @@ function loadVue() {
|
|||
mouseY,
|
||||
shiftDown,
|
||||
ctrlDown,
|
||||
run,
|
||||
gridRun,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ var gameEnded = false;
|
|||
|
||||
// Don't change this
|
||||
const TMT_VERSION = {
|
||||
tmtNum: "2.5.12",
|
||||
tmtNum: "2.6",
|
||||
tmtName: "Dreams Really Do Come True"
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ function gameLoop(diff) {
|
|||
clearParticles()
|
||||
}
|
||||
|
||||
if (isNaN(diff)) diff = 0
|
||||
if (isNaN(diff) || diff < 0) diff = 0
|
||||
if (gameEnded && !player.keepGoing) {
|
||||
diff = 0
|
||||
//player.tab = "gameEnded"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue