Migrate NPC registry durable contract

This commit is contained in:
2026-08-05 18:25:04 +00:00
parent 916a32195b
commit 9653e06297
56 changed files with 256 additions and 237 deletions

View File

@@ -156,7 +156,7 @@ func registryReferences(t *testing.T, names ...string) contracts.ReferenceSet {
for index, name := range names {
npcs[index] = dnd.NPC{ID: identity.DeriveID(name), Name: name, SourceRefs: []source.SourceRef{{SourceID: "other-session", StartUnitID: index + 1, EndUnitID: index + 1}}}
}
content, err := npccodec.New().Encode(dnd.NPCList{NPCs: npcs})
content, err := npccodec.New().Encode(dnd.NPCRegistry{NPCs: npcs})
if err != nil {
t.Fatal(err)
}

View File

@@ -124,7 +124,7 @@ func registryReferences(t *testing.T, names ...string) contracts.ReferenceSet {
for index, name := range names {
npcs[index] = dnd.NPC{ID: identity.DeriveID(name), Name: name, SourceRefs: []source.SourceRef{{SourceID: "other-session", StartUnitID: index + 1, EndUnitID: index + 1}}}
}
content, err := npccodec.New().Encode(dnd.NPCList{NPCs: npcs})
content, err := npccodec.New().Encode(dnd.NPCRegistry{NPCs: npcs})
if err != nil {
t.Fatal(err)
}