aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/server.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-05 17:05:14 -0400
committerhistoria <[not public]>2026-10-05 17:05:14 -0400
commite42952469dadfb3535633c66c881050ac128703c (patch)
treea78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/admin/server.go
parent90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff)
downloadthehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/admin/server.go')
-rw-r--r--internal/admin/server.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/admin/server.go b/internal/admin/server.go
index 96b5981..8fcba77 100644
--- a/internal/admin/server.go
+++ b/internal/admin/server.go
@@ -1092,6 +1092,12 @@ func (s *AdminServer) rebuildAfterUndo(change *ChangeDesc) {
if s.evictRoom != nil {
s.evictRoom(id)
}
+ } else if s.reconcileRoom != nil {
+ // The file still exists but its content changed: refresh the
+ // live room so a removed spawn/object stops lingering and a
+ // restored one appears. Without this, undo of a content edit
+ // is not reflected until restart.
+ s.reconcileRoom(id)
}
}
}
@@ -1126,11 +1132,15 @@ func (s *AdminServer) invalidateEntityCaches(entityType string) {
if s.rebuildCraftIndex != nil {
s.rebuildCraftIndex()
}
+ case "objects":
+ if s.objectStore != nil {
+ s.objectStore.Reload(s.dataDir)
+ }
}
}
func (s *AdminServer) invalidateEntityCacheForPath(path string) {
- for _, subdir := range []string{"mobs", "drops", "items"} {
+ for _, subdir := range []string{"mobs", "drops", "items", "objects"} {
rel, err := filepath.Rel(filepath.Join(s.dataDir, subdir), path)
if err == nil && !strings.HasPrefix(rel, "..") && rel != "." {
s.invalidateEntityCaches(subdir)