diff options
| author | historia <[not public]> | 2026-06-26 02:52:31 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-26 02:52:31 -0400 |
| commit | 3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5 (patch) | |
| tree | 65610fa4fb8abe1dc7a46d00658e85e0525d397c /internal/game/game.go | |
| parent | e2d5b081f27141bb3dd89dbe595860b8a1345d55 (diff) | |
| download | thehouseoficarus-3102525d97aa6f1ad152c74b2ccfbd4b3a9b83f5.tar.gz | |
feat: simplified conversation trees and output won't overwrite prompts now
Diffstat (limited to 'internal/game/game.go')
| -rw-r--r-- | internal/game/game.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/game/game.go b/internal/game/game.go index acd2924..3cfd811 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -153,7 +153,7 @@ func (g *Game) HandleSession(sess *net.Session, input string) { g.handleGameCommand(sess, input) case net.StateChangeDesc: g.handleDescChange(sess, input) - case net.StateTalk: + case net.StateTalk, net.StateTalkSequence: g.handleTalkInput(sess, input) case net.StateShop: g.handleShopInput(sess, input) @@ -177,11 +177,11 @@ func (g *Game) HandleSession(sess *net.Session, input string) { } func (g *Game) writePrompt(sess *net.Session) { - sess.Write("\r\n" + g.promptStr(sess)) + sess.WritePrompt(g.promptStr(sess)) } func (g *Game) reprompt(sess *net.Session) { - sess.Write(g.promptStr(sess)) + sess.Reprompt(g.promptStr(sess)) } func (g *Game) handleGameCommand(sess *net.Session, input string) { |
