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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user