aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_estate_directory.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 20:03:13 -0400
committerhistoria <[not public]>2026-09-18 20:03:13 -0400
commit79764732406d6484f67d3dec045483dcb5d08c28 (patch)
tree7a64e8581a540b97ed554f5723e2d587424ab1c6 /internal/game/cmd_estate_directory.go
parentf1e461ab6aec6b9bf056bbe2daa88a251e0f21da (diff)
downloadthehouseoficarus-79764732406d6484f67d3dec045483dcb5d08c28.tar.gz
feat: better card ascii art
Diffstat (limited to 'internal/game/cmd_estate_directory.go')
-rw-r--r--internal/game/cmd_estate_directory.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/game/cmd_estate_directory.go b/internal/game/cmd_estate_directory.go
index 9966e52..83c5b80 100644
--- a/internal/game/cmd_estate_directory.go
+++ b/internal/game/cmd_estate_directory.go
@@ -2,6 +2,7 @@ package game
import (
"fmt"
+ "log"
"os"
"path/filepath"
"sort"
@@ -182,12 +183,20 @@ func (g *Game) getOwnedHouseRoom(p *player.Player, flagKey string) int {
}
houseMap := map[string]int{
- "local_neighborhood": 99999300,
+ "local_neighborhood": estateNeighborhoodID,
}
return houseMap[v]
}
func (g *Game) teleportPlayer(sess *net.Session, p *player.Player, roomID int) {
+ // Refuse a destination that does not exist: persisting a nonexistent
+ // RoomID soft-locks the character on login (see the login rescue in
+ // core_login_char.go). This is the single choke point every trigger,
+ // module, and estate teleport flows through.
+ if _, err := g.World.LoadRoom(roomID); err != nil {
+ log.Printf("teleport %s: destination room %d does not exist; ignoring", p.Name, roomID)
+ return
+ }
if g.Hub != nil {
for _, other := range g.Hub.PlayersInRoom(p.RoomID) {
if other != sess {