Major farming improvements including (but not limited to):

Farming animation corrections
Farming message updates and additions
Gardeners will chop down fully grown trees for 200 gp
Gardeners will give farming advice
Compost bin debugging admin command ::finishbins restored (finishes any in-progress compost bins)
Compost bin debugging admin command ::resetbins added (resets the player's compost bins to their initial states)
Players can no longer pay gardeners to protect diseased or dead farming patches
Can no longer water dead patches
Weeds will now grow in farming patches as part of the offline catch-up
Trees that are not fully grown can now be dug up
This commit is contained in:
zsrv
2024-10-07 11:15:52 +00:00
committed by Ryan
parent cc8dd4edb4
commit 218a040f8b
20 changed files with 515 additions and 363 deletions
@@ -36,13 +36,22 @@ class HealthChecker : OptionHandler() {
rewardXP(player, Skills.FARMING, patch.plantable?.checkHealthXP ?: 0.0)
patch.isCheckHealth = false
when (type) {
PatchType.TREE_PATCH -> patch.setCurrentState(patch.getCurrentState() + 1)
PatchType.FRUIT_TREE_PATCH -> patch.setCurrentState(patch.getCurrentState() - 14)
PatchType.BUSH_PATCH -> {
sendMessage(player, "You examine the bush for signs of disease and find that it's in perfect health.")
patch.setCurrentState(patch.plantable!!.value + patch.plantable!!.stages + 4)
PatchType.TREE_PATCH -> {
patch.setCurrentState(patch.getCurrentState() + 1)
sendMessage(player, "You examine the tree for signs of disease and find that it is in perfect health.")
}
PatchType.FRUIT_TREE_PATCH -> {
patch.setCurrentState(patch.getCurrentState() - 14)
sendMessage(player, "You examine the tree for signs of disease and find that it is in perfect health.")
}
PatchType.BUSH_PATCH -> {
patch.setCurrentState(patch.plantable!!.value + patch.plantable!!.stages + 4)
sendMessage(player, "You examine the bush for signs of disease and find that it's in perfect health.")
}
PatchType.CACTUS_PATCH -> {
patch.setCurrentState(patch.plantable!!.value + patch.plantable!!.stages + 3)
sendMessage(player, "You examine the cactus for signs of disease and find that it is in perfect health.")
}
PatchType.CACTUS_PATCH -> patch.setCurrentState(patch.plantable!!.value + patch.plantable!!.stages + 3)
else -> log(this::class.java, Log.ERR, "Unreachable patch type from when(type) switch in HealthChecker.kt")
}