diff options
| author | historia <[not public]> | 2026-09-15 13:56:10 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-15 13:56:48 -0400 |
| commit | b3568f03e4103dd46db2ccc680fbab0a6454d604 (patch) | |
| tree | db3f6bb4f3d7c1deefbcd50de0f5022756d6b9ae /internal/game/cmd_trigger_transport.go | |
| parent | f4ea40c4b3589104dfaced3481ba19c5735889ae (diff) | |
| download | thehouseoficarus-b3568f03e4103dd46db2ccc680fbab0a6454d604.tar.gz | |
fix: telnet buffer reuse, bank stack handling,
transport casino gate, and admin cache invalidation
Diffstat (limited to 'internal/game/cmd_trigger_transport.go')
| -rw-r--r-- | internal/game/cmd_trigger_transport.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/game/cmd_trigger_transport.go b/internal/game/cmd_trigger_transport.go index e2053b0..dbb0d16 100644 --- a/internal/game/cmd_trigger_transport.go +++ b/internal/game/cmd_trigger_transport.go @@ -13,6 +13,13 @@ func (g *Game) triggerTransport(sess *net.Session, p *player.Player, mod *ModDef return } + // Transport would strand the player at a remote room while still seated at + // a table or machine; require them to stop playing first. + if _, playing := g.Casino.Participation(p.Name); playing { + sess.WriteLine("You're playing a game. Type \"stop\" between rounds before transporting.") + return + } + if p.Action != nil { g.cancelAction(p) } @@ -22,6 +29,13 @@ func (g *Game) triggerTransport(sess *net.Session, p *player.Player, mod *ModDef } func (g *Game) executeTransportEffect(sess *net.Session, p *player.Player, mod *ModDef) { + // Safety net: sequenced modules reach the effect from advanceTriggerModule + // without re-entering triggerTransport. Never teleport a seated gambler. + if g.inCasinoGame(p.Name) { + sess.WriteLine("You're playing a game. Type \"stop\" between rounds before transporting.") + return + } + if g.Hub != nil { for _, other := range g.Hub.PlayersInRoom(p.RoomID) { if other != sess { |
