aboutsummaryrefslogtreecommitdiff
path: root/internal/world/mob.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/world/mob.go')
-rw-r--r--internal/world/mob.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/world/mob.go b/internal/world/mob.go
index b004643..631e3a3 100644
--- a/internal/world/mob.go
+++ b/internal/world/mob.go
@@ -2,6 +2,7 @@ package world
import (
"fmt"
+ "log"
"math/rand"
"os"
"path/filepath"
@@ -441,6 +442,10 @@ func (s *MobStore) LoadDef(id string) (*MobDef, error) {
if err := yaml.Unmarshal(data, &def); err != nil {
return nil, fmt.Errorf("parse mob %s: %w", id, err)
}
+ if def.ID != "" && def.ID != id {
+ log.Printf("mob %s: file %s declares id %q but is loaded as %q; the filename is authoritative and the declared id is ignored",
+ id, path, def.ID, id)
+ }
def.ID = id
s.mu.Lock()