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/object/store.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/object') diff --git a/internal/object/store.go b/internal/object/store.go index 997c324..ee154cf 100644 --- a/internal/object/store.go +++ b/internal/object/store.go @@ -2,6 +2,7 @@ package object import ( "fmt" + "log" "os" "path/filepath" "sync" @@ -43,6 +44,10 @@ func (s *ObjectStore) Load(id string) (*ObjectDef, error) { if err := yaml.Unmarshal(data, &def); err != nil { return nil, fmt.Errorf("parse object %s: %w", id, err) } + if def.ID != "" && def.ID != id { + log.Printf("object %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.cache[id] = &def return &def, nil -- cgit v1.2.3