Farming leprechauns now give free buckets

There is no way to increase the limit past 31, but buckets are so cheap they are just an inconvenience. So now you can deposit and withraw any number of buckets, regardless of what is stored.
This commit is contained in:
randy 2025-02-11 11:12:39 -07:00
parent 5540febf6e
commit 84951244f9

View file

@ -135,7 +135,7 @@ class ToolLeprechaunInterface : InterfaceListener {
player ?: return
val hasAmount = amountInInventory(player, item)
var finalAmount = amount
val spaceLeft = (if (item == Items.BUCKET_1925) 31 else 255) - quantityCheckMethod.invoke(player)
val spaceLeft = (if (item == Items.BUCKET_1925) 255 else 255) - quantityCheckMethod.invoke(player)
if (hasAmount == 0) {
val itemName = if (item == Items.BUCKET_1925) "buckets" else getItemName(item).lowercase()
@ -183,7 +183,7 @@ class ToolLeprechaunInterface : InterfaceListener {
private fun doStackedWithdrawal(player: Player?, item: Int, amount: Int, updateQuantityMethod: (Player?, Int) -> Unit, quantityCheckMethod: (Player?) -> Int) {
player ?: return
val hasAmount = quantityCheckMethod.invoke(player)
val hasAmount = if (item == Items.BUCKET_1925) 31 else quantityCheckMethod.invoke(player)
var finalAmount = amount
if (hasAmount == 0) {