diff --git a/CHANGELOG.md b/CHANGELOG.md index f29af5624..a19236d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Next Release +- Fix a bug where changing the name of a move in the compendium doesn't change it in the move sheet ([#1036](https://github.com/ben/foundry-ironsworn/pull/1036)) + ## 1.24.5 - Fix a bug where cinder/wraith and cursed-die rolls wouldn't work unless Dice So Nice was enabled ([#1035](https://github.com/ben/foundry-ironsworn/pull/1035)) diff --git a/src/module/features/custommoves.ts b/src/module/features/custommoves.ts index a2975903f..88f9e76c5 100644 --- a/src/module/features/custommoves.ts +++ b/src/module/features/custommoves.ts @@ -63,7 +63,7 @@ export async function createMoveTreeForRuleset( ) return { color: move.color ?? null, - displayName: move.name, + displayName: indexEntry.name, uuid: indexEntry.uuid, // TODO: move.uuid triggerText: indexEntry.system?.Trigger?.Text, isRollable: moveTriggerIsRollable(indexEntry?.system?.Trigger), diff --git a/src/module/features/customoracles.ts b/src/module/features/customoracles.ts index 75862ab11..bac65ea53 100644 --- a/src/module/features/customoracles.ts +++ b/src/module/features/customoracles.ts @@ -28,39 +28,6 @@ const emptyNode: () => IOracleTreeNode = () => ({ children: [] }) -async function augmentWithFolderContents(node: IOracleTreeNode) { - const name = game.i18n.localize('IRONSWORN.OracleCategories.Custom') - const rootFolder = game.tables?.directory?.folders.find( - (x) => x.name === name - ) - if (rootFolder == null) return - - function walkFolder(parent: IOracleTreeNode, folder: Folder) { - // Add this folder - const newNode: IOracleTreeNode = { - ...emptyNode(), - displayName: folder.name ?? '(folder)' - } - parent.children.push(newNode) - - // Add its folder children - for (const sub of folder.getSubfolders()) { - walkFolder(newNode, sub) - } - - // Add its table children - for (const table of folder.contents) { - newNode.children.push({ - ...emptyNode(), - tables: [table.uuid], - displayName: table.name ?? '(table)' - }) - } - } - - walkFolder(node, rootFolder) -} - function customFolderOracleCategory(): [IOracleTreeNode, number] { const name = game.i18n.localize('IRONSWORN.OracleCategories.Custom') const ret = { ...emptyNode(), displayName: name }