From 194164a77eb4f2479b94c19e6f0e1278ab608781 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 18 Sep 2026 16:13:49 -0400 Subject: fix: more casino, economy, gameplay, security, and world data hardening gaps --- internal/world/mob.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/world/mob.go') 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() -- cgit v1.2.3