Skip to content

Commit

Permalink
Add error to decant singular dose potions (#5700)
Browse files Browse the repository at this point in the history
Adds an error message for when a user tries to decant a singular dose potion.

Closes #5699
  • Loading branch information
TastyPumPum committed Feb 22, 2024
1 parent ed68ff2 commit 44ded68
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/minions/functions/decantPotionFromBank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 44ded68

Please sign in to comment.