From 3dfee2048497f9db39b4c28b7efde94eb1950fff Mon Sep 17 00:00:00 2001 From: Vlyan Date: Fri, 11 Feb 2022 14:26:17 +0100 Subject: [PATCH 1/3] Bugfix : Bt in xp tab, Gm monitor render and combat with null --- CHANGELOG.md | 5 +++++ system/scripts/combat.js | 8 ++++---- system/scripts/gm/gm-monitor.js | 1 + system/templates/actors/character/experience.html | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7545909..8ea8aba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 1.6.1 - Bugfix +- PC sheet : fixed the "Complete this rank" button who stayed hidden in experience tab. +- GmMonitor : fixed a bug with render when the list was emptied. +- Combat : fixed a null error when sometimes the combatant actor is null. + ## 1.6.0 - QoL & SoftLock - PC/NPC/Armies sheet: - Added SoftLock functionality. diff --git a/system/scripts/combat.js b/system/scripts/combat.js index 452e193..8ce70d5 100644 --- a/system/scripts/combat.js +++ b/system/scripts/combat.js @@ -142,14 +142,14 @@ export class CombatL5r5e extends Combat { * @private */ _sortCombatants(a, b) { - // if tie, sort by honor, less honorable first + // if tie : sort by honor, less honorable first if (a.initiative === b.initiative) { - // skip if armies - if (a.actor.data.type === "army" || b.actor.data.type === "army") { + // skip if no actor or if armies + if (!a.actor || !b.actor || a.actor.data.type === "army" || b.actor.data.type === "army") { return 0; } - // if tie, Character > Adversary > Minion + // if tie again : Character > Adversary > Minion if (a.actor.data.data.social.honor === b.actor.data.data.social.honor) { return ( CombatL5r5e._getWeightByActorType(a.actor.data) - CombatL5r5e._getWeightByActorType(b.actor.data) diff --git a/system/scripts/gm/gm-monitor.js b/system/scripts/gm/gm-monitor.js index 84d60fa..4971576 100644 --- a/system/scripts/gm/gm-monitor.js +++ b/system/scripts/gm/gm-monitor.js @@ -330,6 +330,7 @@ export class GmMonitor extends FormApplication { } if (!foundry.utils.isObjectEmpty(updateData)) { await actor.update(updateData); + this.render(false); } } diff --git a/system/templates/actors/character/experience.html b/system/templates/actors/character/experience.html index e0fc106..4575246 100644 --- a/system/templates/actors/character/experience.html +++ b/system/templates/actors/character/experience.html @@ -55,7 +55,7 @@ {{localize 'l5r5e.advancements.total_xp_curriculum'}} : {{rankObject.spent.curriculum}}{{#if rankObject.goal}} / {{rankObject.goal}}{{/if}} {{localize 'l5r5e.advancements.total_xp_spent'}} : {{rankObject.spent.total}} - {{#if data.editable_not_soft_locked}} + {{#if ../data.editable_not_soft_locked}} {{#ifCond ../data.data.identity.school_rank '<' 6}} {{#ifCond (ifCond ../data.data.identity.school_rank '==' rankObject.rank) '&&' (ifCond rankObject.spent.curriculum '>=' rankObject.goal)}} From a900a2dc4655045ac691cfb5df1bf2a14e94a909 Mon Sep 17 00:00:00 2001 From: Vlyan Date: Fri, 11 Feb 2022 15:19:30 +0100 Subject: [PATCH 2/3] update version --- system/system.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/system.json b/system/system.json index e4ae967..8cc039f 100644 --- a/system/system.json +++ b/system/system.json @@ -4,8 +4,8 @@ "description": "This is an authorised multilingual game system En|Fr|Es, for Legend of the Five Rings (5th Edition) by Edge Studio

- Join the official Discord server: Official Discord

- Rejoignez la communauté Francophone: Francophone Discord

", "url": "https://gitlab.com/teaml5r/l5r5e", "manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json", - "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.6.0/raw/l5r5e.zip?job=build", - "version": "1.6.0", + "download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.6.1/raw/l5r5e.zip?job=build", + "version": "1.6.1", "minimumCoreVersion": "9", "compatibleCoreVersion": "9", "manifestPlusVersion": "1.0.0", From d06926e8f6645d57e7cfc936aa20807b8332c8d7 Mon Sep 17 00:00:00 2001 From: Vlyan Date: Sun, 13 Feb 2022 17:02:59 +0100 Subject: [PATCH 3/3] 1.6.1 Little Bugfixes --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ea8aba..f1ac03f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 1.6.1 - Bugfix +## 1.6.1 - Little Bugfixes - PC sheet : fixed the "Complete this rank" button who stayed hidden in experience tab. - GmMonitor : fixed a bug with render when the list was emptied. - Combat : fixed a null error when sometimes the combatant actor is null.