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:
@@ -156,7 +156,7 @@ async function scanClientSide(): Promise<JournalCompletions> {
|
||||
|
||||
if (attrs.role === "stat-modifiers") {
|
||||
const id = attrs.id || `_mod_${filePath}_${stats.length}`;
|
||||
const result = parseStatModifiers(body, filePath, id);
|
||||
const result = parseStatModifiers(body, filePath, id, "player", attrs.extra["label"]);
|
||||
stats.push(result.statDef);
|
||||
stats.push(...result.modifierDefs);
|
||||
statTemplates.push(result.template);
|
||||
|
||||
Reference in New Issue
Block a user