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
@@ -108,8 +108,8 @@ abstract class DialogueFile {
interpreter!!.sendDialogues(entity, expression, *messages)
}
open fun options(vararg options: String?) {
interpreter!!.sendOptions("Select an Option", *options)
open fun options(vararg options: String?, title: String = "Select an Option") {
interpreter!!.sendOptions(title, *options)
}
/**
@@ -151,7 +151,7 @@ abstract class DialogueFile {
player?.dialogueInterpreter?.sendDialogue(*messages)
}
fun showTopics(vararg topics: Topic<*>): Boolean {
fun showTopics(vararg topics: Topic<*>, title: String = "Select an Option"): Boolean {
val validTopics = ArrayList<String>()
topics.filter { if(it is IfTopic) it.showCondition else true }.forEach {
topic -> interpreter!!.activeTopics.add(topic)
@@ -172,7 +172,7 @@ abstract class DialogueFile {
interpreter!!.activeTopics.clear()
return false
}
else { options(*validTopics.toTypedArray())
else { options(*validTopics.toTypedArray(), title = title)
return false
}
}
@@ -532,6 +532,24 @@ class MiscCommandSet : CommandSet(Privilege.ADMIN){
}
define("finishbins", Privilege.ADMIN, "", "Finishes any in-progress compost bins."){ player, _ ->
val bins = getOrStartTimer<Compost>(player).getBins()
for (bin in bins) {
if (!bin.isFinished && bin.isClosed) bin.finish()
}
}
define("resetbins", Privilege.ADMIN, "", "Resets the player's compost bins to their initial states."){ player, _ ->
val bins = getOrStartTimer<Compost>(player).getBins()
for (bin in bins) bin.reset()
}
define("diseasecrops", Privilege.ADMIN, "", "Disease all crops"){ player, _ ->
val state = getOrStartTimer<CropGrowth>(player)
for (patch in state.getPatches()){
patch.diseaseMod = -128
patch.nextGrowth = System.currentTimeMillis() + 1
}
state.run(player)
}
define("addcredits", Privilege.ADMIN){ player, _ ->