diff options
Diffstat (limited to 'internal/world/trigger_store.go')
| -rw-r--r-- | internal/world/trigger_store.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/world/trigger_store.go b/internal/world/trigger_store.go index f00d256..b5fac5b 100644 --- a/internal/world/trigger_store.go +++ b/internal/world/trigger_store.go @@ -51,6 +51,15 @@ func NewTriggerStore() *TriggerStore { } } +func (ts *TriggerStore) ClearTriggers() { + ts.mu.Lock() + defer ts.mu.Unlock() + ts.globalByPlayerFlag = make(map[string][]*TriggerDef) + ts.globalByWorldFlag = make(map[string][]*TriggerDef) + ts.roomByPlayerFlag = make(map[int]map[string][]*TriggerDef) + ts.roomByWorldFlag = make(map[int]map[string][]*TriggerDef) +} + func (ts *TriggerStore) LoadGlobal(dataDir string) error { dir := filepath.Join(dataDir, "triggers") if _, err := os.Stat(dir); os.IsNotExist(err) { |
