Fixed unnoting items failing to unnote correctly when quantity is equal to free slots

This commit is contained in:
GregF 2024-03-17 08:01:20 +00:00 committed by Ryan
parent ed47883bea
commit 6e9183ea8f

View file

@ -52,7 +52,9 @@ class BankBoothListener : InteractionListener {
var amount = item.amount var amount = item.amount
val freeSlotCount = freeSlots(player) val freeSlotCount = freeSlots(player)
if (amount > freeSlotCount) { // If there is exactly one more note than free slots
// the note disappearing can be used as the last slot
if (amount > freeSlotCount && amount != freeSlotCount + 1) {
amount = freeSlotCount amount = freeSlotCount
} }