feat(npcs): add groups, storyline bindings, and Foundry import

Nested NPC groups with color, graph filter, and scene/storyline binding; Foundry worlds/modules import actors into groups; storyline merge asks on NPC name conflicts and reports NPC counts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-20 13:19:22 +08:00
parent 37ba855faf
commit f4c0ac1438
41 changed files with 5210 additions and 418 deletions
+11
View File
@@ -0,0 +1,11 @@
/** Декодирует %20 и т.п. в путях Foundry; безопасен для уже декодированных строк. */
export function decodeFoundryAssetPath(foundryPath: string): string {
const trimmed = foundryPath.trim().replace(/\\/gu, '/').replace(/^\/+/u, '');
if (!trimmed) return '';
if (/^https?:\/\//iu.test(trimmed)) return trimmed;
try {
return decodeURIComponent(trimmed);
} catch {
return trimmed;
}
}