aboutsummaryrefslogtreecommitdiff
path: root/internal/object/item_store.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-25 04:46:40 -0400
committerhistoria <[not public]>2026-06-25 04:46:40 -0400
commit2725e2927a1595c7b100d942d1f14146252adeb7 (patch)
treee8bc2292634a2d686c751981ddb3097517cccc6a /internal/object/item_store.go
parent94a06fbbe682701ca4d4bd2a70cd74d8df29c932 (diff)
downloadthehouseoficarus-2725e2927a1595c7b100d942d1f14146252adeb7.tar.gz
feat: who, global chat, removed redundant YAML IDs
Diffstat (limited to 'internal/object/item_store.go')
-rw-r--r--internal/object/item_store.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/object/item_store.go b/internal/object/item_store.go
index 8bc85e4..e930220 100644
--- a/internal/object/item_store.go
+++ b/internal/object/item_store.go
@@ -40,6 +40,7 @@ func (s *ItemStore) Load(id string) (*ItemDef, error) {
if err := yaml.Unmarshal(data, &def); err != nil {
return nil, fmt.Errorf("parse item %s: %w", id, err)
}
+ def.ID = id
s.cache[id] = &def
return &def, nil
}
@@ -56,6 +57,7 @@ func (s *ItemStore) LoadAll() ([]*ItemDef, error) {
if err := yaml.Unmarshal(data, &def); err != nil {
return fmt.Errorf("parse item %s: %w", id, err)
}
+ def.ID = id
s.cache[id] = &def
defs = append(defs, &def)
return nil