Adds NPCs

This commit is contained in:
2025-05-31 22:39:53 -07:00
parent 4bed1c6e65
commit f3bfb2736c
8 changed files with 225 additions and 8 deletions

View File

@@ -23,6 +23,7 @@ export const RelationshipType = {
Scenes: "scenes",
Secrets: "secrets",
Treasures: "treasures",
Npcs: "npcs",
} as const;
export type RelationshipType =
@@ -51,6 +52,21 @@ export type Document = RecordModel & {
updated: ISO8601Date;
};
/** NPCs **/
export type Npc = Document &
DocumentData<
"npc",
{
name: string;
description: string;
}
>;
export function isNpc(doc: Document): doc is Npc {
return Object.hasOwn(doc.data, "npc");
}
/** Session **/
export type Session = Document &