aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_trigger_transport.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-15 13:56:10 -0400
committerhistoria <[not public]>2026-09-15 13:56:48 -0400
commitb3568f03e4103dd46db2ccc680fbab0a6454d604 (patch)
treedb3f6bb4f3d7c1deefbcd50de0f5022756d6b9ae /internal/game/cmd_trigger_transport.go
parentf4ea40c4b3589104dfaced3481ba19c5735889ae (diff)
downloadthehouseoficarus-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.go14
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 {