From 9d4b799db4868bcab291b83599ff088763cd4ed6 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 24 Jun 2026 20:58:25 -0400 Subject: feat: new type of non-violent 'combat': work --- internal/game/game.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'internal/game/game.go') diff --git a/internal/game/game.go b/internal/game/game.go index a1b7bbe..b9b54ba 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -59,6 +59,8 @@ type Game struct { hackingStates map[string]*hacking.Session safespotMu sync.Mutex safespotStates map[string]*SafespotState + enterMu sync.Mutex + enterSeqs map[string]*enterSeq } type SafespotState struct { @@ -92,6 +94,7 @@ func New(dataDir string, colorConfig *config.ColorsConfig, valConfig config.Vali guardWatchTimers: make(map[string]int), hackingStates: make(map[string]*hacking.Session), safespotStates: make(map[string]*SafespotState), + enterSeqs: make(map[string]*enterSeq), } g.CourseStore.LoadAll() g.LoadMods() @@ -105,6 +108,7 @@ func (g *Game) SetHub(hub *net.Hub) { hub.OnRemove(func(sess *net.Session) { if p := sess.Player; p != nil { p.DeactivateAllTechs() + g.cancelEnterSeq(p.Name) g.charsMu.Lock() delete(g.loggedInChars, p.Name) g.charsMu.Unlock() @@ -167,6 +171,8 @@ func (g *Game) HandleSession(sess *net.Session, input string) { g.handleColorChoice(sess, input) case net.StateHacking: g.handleHackingInput(sess, input) + case net.StateDangerConfirm: + g.handleDangerConfirm(sess, input) } } -- cgit v1.2.3