package game // ReconcileRoom refreshes a room's live runtime state from its on-disk // definition after a content edit, without a restart. Object instances and // item-spawn ground entries are reconciled by World; mob instances are dropped // and reseeded here because MobStore is owned by the game layer. Player-dropped // ground items and live reservations are preserved. // // It runs on the owner goroutine (the admin callbacks that call it already do) // and must not redispatch. func (g *Game) ReconcileRoom(roomID int) { room, err := g.World.LoadRoom(roomID) if err != nil { return } g.World.ReconcileRoomState(roomID, room) // Guard-watch cycle timers are keyed by room:object; an object edit can // remove the object the timer belonged to, so drop the room's timers. g.clearGuardWatchRoom(roomID) if g.MobStore != nil { g.MobStore.RemoveMobsInRoom(roomID) g.MobStore.SeedMobs(roomID, room.Mobs) } }