Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
feat: Always build best unicorn building first
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Jun 23, 2022
1 parent b1e22be commit a342b38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/userscript/source/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -803,10 +803,13 @@ export class Engine {
// TODO: It's not clear why this process is split into two steps.

// Create the list of builds, excluding the unicorn pasture.
// Also reverse the build order, so that the best unicorn building is
// always build preferably.
// TODO: The "build best unicorn building first" feature might be redundant.
const builds = Object.fromEntries(
Object.entries(this._host.options.auto.religion.items).filter(
([k, v]) => v.variant !== UnicornItemVariant.UnicornPasture
)
Object.entries(this._host.options.auto.religion.items)
.filter(([k, v]) => v.variant !== UnicornItemVariant.UnicornPasture)
.reverse()
);
// Now we build a unicorn pasture if possible.
if (this._host.options.auto.religion.items.unicornPasture.enabled) {
Expand Down

0 comments on commit a342b38

Please sign in to comment.