diff options
| author | historia <[not public]> | 2026-09-19 01:55:34 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-19 01:55:34 -0400 |
| commit | cc33072eced3d5460512c09c42ec4531c807d7af (patch) | |
| tree | b1b451fa87fa389cb8343a3645372f3b43f5523e /internal/admin/server.go | |
| parent | 2c38386484cdb507c4687caceb37e0b963e33594 (diff) | |
| download | thehouseoficarus-cc33072eced3d5460512c09c42ec4531c807d7af.tar.gz | |
fix: casino stake preservation, world state reconciliation, casino game registration
Diffstat (limited to 'internal/admin/server.go')
| -rw-r--r-- | internal/admin/server.go | 8 |
1 files changed, 8 insertions, 0 deletions
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, |
