diff options
Diffstat (limited to 'internal/game/act_talk.go')
| -rw-r--r-- | internal/game/act_talk.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/internal/game/act_talk.go b/internal/game/act_talk.go index 239e6f5..fa93435 100644 --- a/internal/game/act_talk.go +++ b/internal/game/act_talk.go @@ -278,7 +278,19 @@ func (g *Game) handleTalkInput(sess *net.Session, input string) { func (g *Game) advanceTalk(sess *net.Session, p *player.Player) { td, ok := p.Action.Data.(*behavior.TalkData) - if !ok || td.Cfg == nil { + if !ok { + g.cancelAction(p) + sess.SetState(net.StateGame) + return + } + if td.Cfg == nil { + if td.EstateDirectory { + // The estate-directory prompt is a talk action with no dialogue + // tree; it waits for player input, so there is nothing to advance. + // (handleTalkInput has the same exemption.) Without this the prompt + // was cancelled one tick after it appeared. + return + } g.cancelAction(p) sess.SetState(net.StateGame) return |
