Skip to content

Commit b904d21

Browse files
committed
Fix tool leprechaun dialogue
1 parent 03d9910 commit b904d21

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

game/src/main/kotlin/content/skill/farming/ToolLeprechaun.kt

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import content.entity.player.dialogue.*
66
import content.entity.player.dialogue.type.*
77
import world.gregs.voidps.engine.Script
88
import world.gregs.voidps.engine.client.ui.open
9+
import world.gregs.voidps.engine.entity.character.player.Player
910
import world.gregs.voidps.engine.event.AuditLog
1011
import world.gregs.voidps.engine.inv.inventory
1112
import world.gregs.voidps.engine.inv.transact.TransactionError
@@ -19,22 +20,7 @@ class ToolLeprechaun : Script {
1920
init {
2021
npcOperate("Talk-to", "tool_leprechaun*") {
2122
npc<Happy>("Ah, 'tis a foine day to be sure! Were yez wantin' me to store yer tools, or maybe ye might be wantin' yer stuff back from me?")
22-
choice("What would you like to say?") {
23-
yesPlease()
24-
option<Neutral>("What can you store?") {
25-
npc<Happy>("We'll hold onto yer rake, yer seed dibber, yer spade, yer secateurs, yer waterin' can and yer trowel - but mind it's not one of them fancy trowels only archaeologists use!")
26-
npc<Bored>("We'll take a few buckets off yer hands too, and even yer compost, supercompost an' ultracompost! Also plant cure vials.")
27-
npc<Happy>("Aside from that, if ye hands me yer farming produce, I can mebbe change it into banknotes for ye.")
28-
npc<Quiz>("So... do ye want to be using the store?")
29-
choice("What would you like to say?") {
30-
yesPlease()
31-
whatDoYouDo()
32-
noThanks()
33-
}
34-
}
35-
whatDoYouDo()
36-
noThanks()
37-
}
23+
menu()
3824
}
3925

4026
npcOperate("Exchange", "tool_leprechaun*") {
@@ -67,6 +53,25 @@ class ToolLeprechaun : Script {
6753
}
6854
}
6955

56+
private suspend fun Player.menu() {
57+
choice("What would you like to say?") {
58+
yesPlease()
59+
option<Neutral>("What can you store?") {
60+
npc<Happy>("We'll hold onto yer rake, yer seed dibber, yer spade, yer secateurs, yer waterin' can and yer trowel - but mind it's not one of them fancy trowels only archaeologists use!")
61+
npc<Bored>("We'll take a few buckets off yer hands too, and even yer compost, supercompost an' ultracompost! Also plant cure vials.")
62+
npc<Happy>("Aside from that, if ye hands me yer farming produce, I can mebbe change it into banknotes for ye.")
63+
npc<Quiz>("So... do ye want to be using the store?")
64+
choice("What would you like to say?") {
65+
yesPlease()
66+
whatDoYouDo()
67+
noThanks()
68+
}
69+
}
70+
whatDoYouDo()
71+
noThanks()
72+
}
73+
}
74+
7075
private fun ChoiceOption.yesPlease() {
7176
option("Yes please.") {
7277
open("farming_equipment_store")
@@ -82,6 +87,9 @@ class ToolLeprechaun : Script {
8287
private fun ChoiceOption.whatDoYouDo() {
8388
option("What do you do with the tools you're storing?") {
8489
player<Quiz>("What do you do with the tools you're storing? They can't possibly all fit in your pockets!")
90+
npc<Laugh>("We leprechauns have a shed where we keep 'em. It's a magic shed, so ye can get yer items back from any of us leprechauns whenever ye want. Saves ye havin' to carry loads of stuff around the country!")
91+
npc<Quiz>("So... do ye want to be using the store?")
92+
menu()
8593
}
8694
}
8795
}

0 commit comments

Comments
 (0)