aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_shop.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-26 02:52:31 -0400
committerhistoria <[not public]>2026-06-26 02:52:31 -0400
commit3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5 (patch)
tree65610fa4fb8abe1dc7a46d00658e85e0525d397c /internal/game/cmd_shop.go
parente2d5b081f27141bb3dd89dbe595860b8a1345d55 (diff)
downloadthehouseoficarus-3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5.tar.gz
feat: simplified conversation trees and output won't overwrite prompts now
Diffstat (limited to 'internal/game/cmd_shop.go')
-rw-r--r--internal/game/cmd_shop.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/game/cmd_shop.go b/internal/game/cmd_shop.go
index d1b0e9c..91a11c6 100644
--- a/internal/game/cmd_shop.go
+++ b/internal/game/cmd_shop.go
@@ -88,7 +88,7 @@ func (g *Game) cmdShopSell(sess *net.Session, args []string) {
}
func (g *Game) writeShopPrompt(sess *net.Session) {
- sess.Write(fmt.Sprintf("\n%s", g.colorize(sess, "dialog", "> ")))
+ sess.WritePrompt(g.colorize(sess, "dialog", "> "))
}
func (g *Game) shopConfig(sess *net.Session) *behavior.ShopConfig {
@@ -417,16 +417,16 @@ func (g *Game) leaveShop(sess *net.Session) {
sess.WriteLine(fmt.Sprintf(" %d. %s", i+1, opt.Text))
}
sess.State = net.StateTalk
- sess.Write("\nChoice: ")
+ g.reprompt(sess)
return
}
- if node.Next != "" {
- next, ok := td.Cfg.Nodes[node.Next]
+ if node.Goto != "" {
+ next, ok := td.Cfg.Nodes[node.Goto]
if !ok {
break
}
- td.Node = node.Next
+ td.Node = node.Goto
node = next
} else {
break