Add validation and runtime support for NPC targetable property

This commit is contained in:
2026-05-11 21:23:20 +02:00
parent 5d4e67de48
commit f87d948109
2 changed files with 15 additions and 0 deletions

View File

@@ -4972,6 +4972,18 @@ function validateNpcEntity(
}
validateNpcPresence(entity.presence, `${path}.presence`, diagnostics);
if (typeof entity.targetable !== "boolean") {
diagnostics.push(
createDiagnostic(
"error",
"invalid-npc-targetable",
"NPC targetable must remain a boolean.",
`${path}.targetable`
)
);
}
validateNpcModelAssetId(entity, path, document, diagnostics);
const seenNpcDialogueIds = new Map<string, string>();