Farming patches now return the seeds if the plant being cleared or harvested is fully grown

This commit is contained in:
randy 2024-11-11 21:43:20 -07:00
parent 2e68ac1522
commit 563fcc23bc

View file

@ -350,6 +350,19 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
}
fun clear(){
if (isGrown()) {
var seedAmount = 1
var seedMessage = "a seed"
if (patch.type == PatchType.ALLOTMENT || plantable!! == Plantable.JUTE_SEED) {
seedAmount = 3
seedMessage = "some seeds"
} else if (patch.type == PatchType.HOPS_PATCH) {
seedAmount = 4
seedMessage = "some seeds"
}
addItemOrDrop(player, plantable!!.itemID, seedAmount)
sendMessage(player, "You find $seedMessage in the patch as you clear it.")
}
isCheckHealth = false
isDiseased = false
isDead = false