diff options
| author | historia <[not public]> | 2026-09-18 16:13:49 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 16:13:49 -0400 |
| commit | 194164a77eb4f2479b94c19e6f0e1278ab608781 (patch) | |
| tree | 53413add8ed6f32a34d1733397e380cc98ef70ef /internal/world/mob.go | |
| parent | 67e01aab85607b9e601185c7d62dff576af3bb43 (diff) | |
| download | thehouseoficarus-194164a77eb4f2479b94c19e6f0e1278ab608781.tar.gz | |
fix: more casino, economy, gameplay, security, and world data hardening gaps
Diffstat (limited to 'internal/world/mob.go')
| -rw-r--r-- | internal/world/mob.go | 5 |
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() |
