From a1b6613c6c6a2f8d6e1ecd47e766bd40f92ac295 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sun, 28 Jun 2026 02:40:30 -0400 Subject: feat: admin accounts, god mode, OLC commands like dig/room, 'inline' objects changed to 'local' objects --- internal/game/cmd_reload.go | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 internal/game/cmd_reload.go (limited to 'internal/game/cmd_reload.go') diff --git a/internal/game/cmd_reload.go b/internal/game/cmd_reload.go new file mode 100644 index 0000000..2b8230a --- /dev/null +++ b/internal/game/cmd_reload.go @@ -0,0 +1,37 @@ +package game + +import ( + "thehouseoficarus/internal/behavior" + "thehouseoficarus/internal/net" +) + +func (g *Game) executeReload(sess *net.Session, args []string, rawInput string) { + if !g.checkAdmin(sess) { + sess.WriteLine("Unknown command.") + return + } + + g.ItemStore.Reload(g.DataDir) + g.ObjectStore.Reload(g.DataDir) + g.MobStore.ReloadDefs(g.DataDir) + behavior.ClearDropIndex() + + items, err := g.ItemStore.LoadAll() + if err == nil { + g.CraftIndex.Build(items) + } + + g.LoadTechs() + g.LoadMods() + + g.CourseStore.ReloadAll() + + g.World.RebuildRoomIndex(g.DataDir) + g.World.ClearHazardCache() + + g.TriggerStore.ClearTriggers() + g.TriggerStore.LoadGlobal(g.DataDir) + g.seedRoomTriggers() + + sess.WriteLine("All caches reloaded.") +} -- cgit v1.2.3