Skip to content

Commit

Permalink
fix: Compiler complaints about resources
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Dec 28, 2022
1 parent 7be7404 commit 24f1e28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/userscript/source/WorkshopManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,10 @@ export class WorkshopManager extends UpgradeManager implements Automation {
// we *could* craft.
if (resource.craftable) {
let minProd = Number.MAX_VALUE;
const materials = this.getMaterials((resource as CraftableInfo).name);
const materials = this.getMaterials(resource.name as ResourceCraftable);
for (const [mat, amount] of objectEntries<Resource, number>(materials)) {
const rat =
(1 + this._host.gamePage.getResCraftRatio((resource as CraftableInfo).name)) / amount;
(1 + this._host.gamePage.getResCraftRatio(resource.name as ResourceCraftable)) / amount;
// Currently preTrade is only true for the festival stuff, so including furs from hunting is ideal.
const addProd = this.getTickVal(this.getResource(mat));
if (addProd === "ignore") {
Expand Down

0 comments on commit 24f1e28

Please sign in to comment.