From 0854e25a668cf1bd88e18dcb3ae2f8a7fc49aa1d Mon Sep 17 00:00:00 2001 From: Litasa <5760383-litasa@users.noreply.gitlab.com> Date: Wed, 25 Feb 2026 21:55:00 +0000 Subject: [PATCH] Issue 64: Fixing issue where the new rank did not show until after adding a new item.... --- system/scripts/actors/character-sheet.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/system/scripts/actors/character-sheet.js b/system/scripts/actors/character-sheet.js index 3b42ed5..8da690f 100644 --- a/system/scripts/actors/character-sheet.js +++ b/system/scripts/actors/character-sheet.js @@ -155,6 +155,12 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e { adv[rank].spent.total += xp_used_total; adv[rank].spent.curriculum += xp_used; }); + + // If we finished the rank but haven't added anything to the next rank we should show an empty tab + // note: adv is index from 1, not 0 because of rank starting at 1 + if(adv.length -1 < sheetData.data.system.identity.school_rank) { + adv.push({list: [], rank: sheetData.data.system.identity.school_rank, spent: { total: 0, curriculum: 0}}); + } sheetData.data.advancementsListByRank = adv; }