From c940eabf5fed9e720c879cf8ffc2de19908296ab Mon Sep 17 00:00:00 2001 From: Zirak Date: Tue, 28 Feb 2023 17:18:04 +0000 Subject: [PATCH] fix(religion): Only try crafting BLS up to max Scientists would attempt to refine tears -> BLS even when BLS was at its max. They would repeatedly fail, and everyone would be sad. This commit makes the scientists refine tears only when BLS is below max. --- packages/userscript/source/ReligionManager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/userscript/source/ReligionManager.ts b/packages/userscript/source/ReligionManager.ts index 26819f147..981dfcf1d 100644 --- a/packages/userscript/source/ReligionManager.ts +++ b/packages/userscript/source/ReligionManager.ts @@ -533,10 +533,12 @@ export class ReligionManager implements Automation { private async _autoTears() { const tears = this._workshopManager.getResource("tears"); const available = this._workshopManager.getValueAvailable("tears"); + const sorrow = this._workshopManager.getResource("sorrow"); if ( !isNil(this._host.gamePage.religionTab.refineBtn) && this.settings.refineTears.trigger <= available && - this.settings.refineTears.trigger <= tears.value + this.settings.refineTears.trigger <= tears.value && + sorrow.value < sorrow.maxValue ) { const controller = new classes.ui.religion.RefineTearsBtnController(this._host.gamePage); const model = this._host.gamePage.religionTab.refineBtn.model;