diff options
| author | historia <[not public]> | 2026-06-24 20:58:25 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-24 20:58:25 -0400 |
| commit | 9d4b799db4868bcab291b83599ff088763cd4ed6 (patch) | |
| tree | 252f0fcc779acf35243983d643d6399ee2e0cd0b /internal/game/game.go | |
| parent | d25638d98fe63efdeab570ef77e6a6a97f2d7a60 (diff) | |
| download | thehouseoficarus-9d4b799db4868bcab291b83599ff088763cd4ed6.tar.gz | |
feat: new type of non-violent 'combat': work
Diffstat (limited to 'internal/game/game.go')
| -rw-r--r-- | internal/game/game.go | 6 |
1 files changed, 6 insertions, 0 deletions
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) } } |
