diff options
| author | historia <[not public]> | 2026-06-28 02:40:30 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-28 02:40:30 -0400 |
| commit | a1b6613c6c6a2f8d6e1ecd47e766bd40f92ac295 (patch) | |
| tree | 4ff8fefb029c93f2aa3db7361658b0b4e9805b66 /internal/game/game.go | |
| parent | 87dacfbb3dd16e7f55a82361eace98f9a39d75c8 (diff) | |
| download | thehouseoficarus-a1b6613c6c6a2f8d6e1ecd47e766bd40f92ac295.tar.gz | |
feat: admin accounts, god mode, OLC commands like dig/room, 'inline' objects changed to 'local' objects
Diffstat (limited to 'internal/game/game.go')
| -rw-r--r-- | internal/game/game.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/internal/game/game.go b/internal/game/game.go index 22dd74d..bed75b0 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -62,11 +62,15 @@ type Game struct { loggedInChars map[string]*net.Session restTimers map[string]uint64 guardWatchTimers map[string]int - hackingStates map[string]*hacking.Session + hackingStates map[string]*hacking.Session pendingDepletions []pendingDepletion farmTickCounter int enterMu sync.Mutex enterSeqs map[string]*enterSeq + + shutdownCancel chan struct{} + shutdownActive bool + shutdownMu sync.Mutex } func New(dataDir string, colorConfig *config.ColorsConfig, valConfig config.ValidationConfig) *Game { @@ -108,6 +112,7 @@ func (g *Game) SetHub(hub *net.Hub) { g.Hub = hub hub.OnRemove(func(sess *net.Session) { if p := sess.Player; p != nil { + g.restoreGodPlayer(p) p.DeactivateAllTechs() g.cancelEnterSeq(p.Name) g.charsMu.Lock() @@ -173,6 +178,8 @@ func (g *Game) HandleSession(sess *net.Session, input string) { g.handleHackingInput(sess, input) case net.StateDangerConfirm: g.handleDangerConfirm(sess, input) + case net.StateUndigConfirm: + g.handleUndigConfirm(sess, input) } } |
