From cc33072eced3d5460512c09c42ec4531c807d7af Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 19 Sep 2026 01:55:34 -0400 Subject: fix: casino stake preservation, world state reconciliation, casino game registration --- internal/admin/server.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/admin/server.go') diff --git a/internal/admin/server.go b/internal/admin/server.go index 4cceadd..9c62249 100644 --- a/internal/admin/server.go +++ b/internal/admin/server.go @@ -73,6 +73,12 @@ type AdminServer struct { // wired game callback before the cache entries drop. evictRoom func(roomID int) + // reconcileRoom refreshes a room's live runtime state (object instances, + // item-spawn entries, mob instances) from its edited definition, so a + // content edit takes effect without a restart. Wired from the Game, which + // owns MobStore; optional (nil in tests). + reconcileRoom func(roomID int) + // rebuildCraftIndex rebuilds the in-game craft index after item files // change (create/update/delete/rename/move/undo/redo). Wired from the // Game so the web editor's item edits stay consistent with gameplay. @@ -107,6 +113,7 @@ type ServerDeps struct { ReloadCourses func() RewriteRoomIDs func(map[int]int) EvictRoom func(roomID int) + ReconcileRoom func(roomID int) RebuildCraftIndex func() ConfigPath string RunOnOwner func(func()) bool @@ -161,6 +168,7 @@ func NewServer(deps ServerDeps) (*AdminServer, error) { reloadCourses: deps.ReloadCourses, rewriteRoomIDs: deps.RewriteRoomIDs, evictRoom: deps.EvictRoom, + reconcileRoom: deps.ReconcileRoom, rebuildCraftIndex: deps.RebuildCraftIndex, configPath: deps.ConfigPath, runOnOwner: deps.RunOnOwner, -- cgit v1.2.3