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/world/mob.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'internal/world/mob.go') diff --git a/internal/world/mob.go b/internal/world/mob.go index d3ea05b..e02da53 100644 --- a/internal/world/mob.go +++ b/internal/world/mob.go @@ -289,6 +289,13 @@ func (s *MobStore) AllDefIDs() map[string]bool { return ids } +func (s *MobStore) ReloadDefs(dataDir string) { + s.mu.Lock() + defer s.mu.Unlock() + s.defs = make(map[string]*MobDef) + s.pathIndex = behavior.BuildPathIndex(filepath.Join(dataDir, "mobs")) +} + func (s *MobStore) GetInstance(id string) *MobInstance { s.mu.Lock() defer s.mu.Unlock() @@ -371,6 +378,16 @@ func (s *MobStore) RemoveInstance(instanceID string) { delete(s.instances, instanceID) } +func (s *MobStore) RemoveMobsInRoom(roomID int) { + s.mu.Lock() + defer s.mu.Unlock() + for id, inst := range s.instances { + if inst.RoomID == roomID { + delete(s.instances, id) + } + } +} + func (s *MobStore) SeedMobs(roomID int, entries []RoomMob) { type defWrapper struct { def *MobDef -- cgit v1.2.3