From d624566956bb44a04d8aea59be220290e601ae9f Mon Sep 17 00:00:00 2001 From: TastyPumPum Date: Mon, 19 Feb 2024 16:33:13 +0000 Subject: [PATCH] Add error to decant singular dose potions Adds an error message for when a user tries to decant a singular dose potion. Closes #5699 --- src/lib/minions/functions/decantPotionFromBank.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/minions/functions/decantPotionFromBank.ts b/src/lib/minions/functions/decantPotionFromBank.ts index b0fca1dcce..1e531be523 100644 --- a/src/lib/minions/functions/decantPotionFromBank.ts +++ b/src/lib/minions/functions/decantPotionFromBank.ts @@ -24,6 +24,7 @@ export default function decantPotionFromBank( return { error: "That's not a valid potion that you can decant." }; } if (potionToDecant.items.length === 2 && dose > 2) return { error: 'You can only decant mixes into 1 or 2 doses.' }; + if (potionToDecant.items.length === 1) return { error: `You can't decant ${potionToDecant.name}.` }; const potionsToRemove = new Bank(); const potionsToAdd = new Bank(); let sumOfPots = 0;