feat: support custom labels for stat modifiers
Allows passing an optional label to `parseStatModifiers` to override the default ID-based label. This enables more descriptive names in the UI and improves how modifier labels are derived in the journal view.
This commit is contained in:
@@ -114,7 +114,7 @@ export function processBlocks(
|
||||
|
||||
if (attrs.role === "stat-modifiers") {
|
||||
const id = attrs.id || `_mod_${contentHash(body)}`;
|
||||
const result = parseStatModifiers(body, fileRelativePath, id);
|
||||
const result = parseStatModifiers(body, fileRelativePath, id, "player", attrs.extra["label"]);
|
||||
blocks.stats.push(result.statDef);
|
||||
blocks.stats.push(...result.modifierDefs);
|
||||
blocks.statTemplates.push(result.template);
|
||||
|
||||
Reference in New Issue
Block a user