From 7ea40cbd00f7ddae53a8e43dd018d62ca798f8cf Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 9 Jul 2026 17:47:39 -0400 Subject: feat(admin): exits to non-existent rooms show on map as ? --- internal/admin/api_map.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'internal/admin/api_map.go') diff --git a/internal/admin/api_map.go b/internal/admin/api_map.go index f5fd9ee..6e62d9e 100644 --- a/internal/admin/api_map.go +++ b/internal/admin/api_map.go @@ -175,6 +175,7 @@ func (s *AdminServer) handleMap(w http.ResponseWriter, r *http.Request) { Bidirectional bool `json:"bidirectional"` Hidden bool `json:"hidden"` AlwaysBlocked bool `json:"always_blocked"` + Missing bool `json:"missing"` } type UDLink struct { @@ -243,8 +244,22 @@ func (s *AdminServer) handleMap(w http.ResponseWriter, r *http.Request) { if target <= 0 { continue } - targetCoord, ok := g.Coord[target] - if !ok { + targetCoord, hasCoord := g.Coord[target] + targetExists := s.world.RoomIndex()[target] + + if !targetExists || !hasCoord { + if dir != world.Up && dir != world.Down { + key := linkKey(rid, target) + if !seenLinks[key] { + seenLinks[key] = true + links = append(links, LinkEntry{ + From: rid, + To: target, + Dir: string(dir), + Missing: true, + }) + } + } continue } -- cgit v1.2.3