diff options
Diffstat (limited to 'internal/game/act_talk.go')
| -rw-r--r-- | internal/game/act_talk.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/game/act_talk.go b/internal/game/act_talk.go index 9ae9959..239e6f5 100644 --- a/internal/game/act_talk.go +++ b/internal/game/act_talk.go @@ -192,7 +192,16 @@ func (g *Game) handleTalkInput(sess *net.Session, input string) { } td, ok := p.Action.Data.(*behavior.TalkData) - if !ok || td.Cfg == nil { + if !ok { + g.cancelAction(p) + sess.SetState(net.StateGame) + g.writePrompt(sess) + return + } + // The estate-directory prompt is a talk action with no dialogue tree + // (Cfg == nil), so it must be allowed through to its own handler below + // instead of being cancelled as a malformed talk node. + if td.Cfg == nil && !td.EstateDirectory { g.cancelAction(p) sess.SetState(net.StateGame) g.writePrompt(sess) |
