feat: game flow draft 2; time machine first draft

This commit is contained in:
pskfyi 2022-01-11 22:23:41 -08:00 committed by pskfyi
commit 233a1a4daa
10 changed files with 181 additions and 19 deletions

View file

@ -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')
}
},
},
}