diff options
| author | historia <[not public]> | 2026-06-29 01:00:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-29 01:00:17 -0400 |
| commit | e9d87838590a02c7ca028fad8cd16e42a582dd32 (patch) | |
| tree | 0d9770d8fc728946c5452e732efbad393a745a23 /internal/game/game.go | |
| parent | fffc132263ab7d3c402992bffbaae4790161f7a7 (diff) | |
| download | thehouseoficarus-e9d87838590a02c7ca028fad8cd16e42a582dd32.tar.gz | |
feat: self-signed certificates
Diffstat (limited to 'internal/game/game.go')
| -rw-r--r-- | internal/game/game.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/game/game.go b/internal/game/game.go index bed75b0..c30f9aa 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -56,6 +56,7 @@ type Game struct { queue *CommandQueue safespot *SafespotManager ValidationConfig config.ValidationConfig + StartingRoom int // Per-tick / per-session runtime bookkeeping. charsMu sync.Mutex @@ -73,7 +74,7 @@ type Game struct { shutdownMu sync.Mutex } -func New(dataDir string, colorConfig *config.ColorsConfig, valConfig config.ValidationConfig) *Game { +func New(dataDir string, colorConfig *config.ColorsConfig, valConfig config.ValidationConfig, startingRoom int) *Game { g := &Game{ Deps: Deps{ World: world.New(dataDir), @@ -93,6 +94,7 @@ func New(dataDir string, colorConfig *config.ColorsConfig, valConfig config.Vali queue: NewCommandQueue(), safespot: NewSafespotManager(), ValidationConfig: valConfig, + StartingRoom: startingRoom, loggedInChars: make(map[string]*net.Session), restTimers: make(map[string]uint64), guardWatchTimers: make(map[string]int), @@ -251,7 +253,7 @@ func (g *Game) handleGameCommand(sess *net.Session, input string) { Args: strings.Join(parts[1:], " "), Timestamp: time.Now(), }) - if !p.OptionBool("queue_silently") { + if p.OptionBool("show_queued_cmds") { sess.WriteLine(fmt.Sprintf("You prepare to %s.", cmd)) } return @@ -270,7 +272,7 @@ func (g *Game) handleGameCommand(sess *net.Session, input string) { Timestamp: time.Now(), }) g.cancelRest(p.Name) - if !p.OptionBool("queue_silently") { + if p.OptionBool("show_queued_cmds") { sess.WriteLine(fmt.Sprintf("You prepare to %s.", cmd)) } } |
