forked from 2009Scape/Server
Farming patches now return the seeds if the plant being cleared or harvested is fully grown
This commit is contained in:
parent
2e68ac1522
commit
563fcc23bc
1 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue