Closed steve2116 closed 1 week ago
This code was updated today already. To be more modular.
handleAutoCreations() {
const prestigeStore = usePrestigeStore()
const autoActions = [
{ enabled: prestigeStore.autoSeedStorageUpgrade, action: this.upgradeSeedStorage },
{ enabled: prestigeStore.autoAntCreation, action: this.createMaxAnts },
{ enabled: prestigeStore.autoQueenCreation, action: this.buyMaxQueens },
]
autoActions.forEach(autoAction => {
if (autoAction.enabled) {
autoAction.action()
}
})
},
I've changed the order of the array, this way, the upgrade is called before calling the ants and queens. Prioritizing upgrading the storage. Hope that's what you wanted. :)
When there are a lot of ants producing a lot of seeds, and an equally high amount of queens producing a lot of larva, because of the order of calculations the game can get "stuck" where queens aren't purchased and ants are bought in small quantities whereas the seed storage is not bought at all even though between "ticks" the seed amount is maxed out.
I think it can be fixed by adding an if in the handleAutoCreations method in gameStore.ts to check whether the seed storage is maxed out - and if so then upgrading the seed storage first.
~ Before ~
~ After ~
(There's also a flag to prevent buying two seed storages commented out)
Obviously, this is just a suggestion. Depending on how you look at it, it could not be a bug but instead a decision to get the user to be more active 🤷♂️