feat: game flow draft 2; time machine first draft
This commit is contained in:
parent
82fd1b3e12
commit
233a1a4daa
10 changed files with 181 additions and 19 deletions
|
|
@ -53,6 +53,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
gametick() {
|
||||
// Instruments tick
|
||||
this.$store.state.processes
|
||||
.filter((p) => p.created)
|
||||
.forEach((process, index) => {
|
||||
|
|
@ -65,6 +66,14 @@ export default {
|
|||
|
||||
this.$store.commit('tickProcess', { process })
|
||||
})
|
||||
|
||||
// Energy ticks
|
||||
if (
|
||||
this.$store.getters.isTabUnlocked('Time Machine') &&
|
||||
this.$store.state.energy < this.$store.state.energyMax
|
||||
) {
|
||||
this.$store.commit('tickEnergy')
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue