From 45e9e94646f4764b363bb7e4169c6e7b12d903e9 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 14 Nov 2024 22:36:57 +0100 Subject: [PATCH 1/4] Fix selection des status effects --- changelog.md | 6 ++++++ module/settings/status-effects.js | 24 ++++++++++++------------ styles/simple.css | 8 ++++++++ templates/settings/status-effects.html | 6 +++--- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/changelog.md b/changelog.md index 8eae2d44..7c8abb4c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,10 @@ # 12.0 +## 12.0.21 - La nomination d'Astrobazzarh +- Fix: le choix des effets dans les options s'affiche correctement + +## 12.0.20 - Le tableau d'Astrobazzarh +- Ecran d'accueil officiel Scriptarium + ## 12.0.19 - La témérité d'Astrobazzarh - Fix - les défenses des créatures sont correctement filtrées diff --git a/module/settings/status-effects.js b/module/settings/status-effects.js index b8d4592a..7caeda8a 100644 --- a/module/settings/status-effects.js +++ b/module/settings/status-effects.js @@ -15,17 +15,17 @@ export const STATUSES = { } const rddStatusEffects = [ - { rdd: true, id: STATUSES.StatusStunned, label: 'EFFECT.StatusStunned', icon: 'icons/svg/stoned.svg', "duration.rounds": 1 }, - { rdd: true, id: STATUSES.StatusBleeding, label: 'EFFECT.StatusBleeding', icon: 'icons/svg/blood.svg' }, - { rdd: true, id: STATUSES.StatusProne, label: 'EFFECT.StatusProne', icon: 'icons/svg/falling.svg' }, - { rdd: true, id: STATUSES.StatusGrappling, tint: '#33cc33', label: 'EFFECT.StatusGrappling', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.webp' }, - { rdd: true, id: STATUSES.StatusGrappled, tint: '#ff9900', label: 'EFFECT.StatusGrappled', icon: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.webp' }, - { rdd: true, id: STATUSES.StatusRestrained, label: 'EFFECT.StatusRestrained', icon: 'icons/svg/net.svg' }, - { rdd: true, id: STATUSES.StatusUnconscious, label: 'EFFECT.StatusUnconscious', icon: 'icons/svg/unconscious.svg' }, - { rdd: true, id: STATUSES.StatusBlind, label: 'EFFECT.StatusBlind', icon: 'icons/svg/blind.svg' }, - { rdd: true, id: STATUSES.StatusComma, label: 'EFFECT.StatusComma', icon: 'icons/svg/skull.svg' }, - { rdd: true, id: STATUSES.StatusDead, label: 'EFFECT.StatusDead', icon: 'icons/svg/skull.svg' }, - { rdd: true, id: STATUSES.StatusDemiReve, label: 'EFFECT.StatusDemiReve', icon: 'systems/foundryvtt-reve-de-dragon/icons/heures/hd12.svg' } + { rdd: true, id: STATUSES.StatusStunned, name: 'EFFECT.StatusStunned', img: 'icons/svg/stoned.svg', "duration.rounds": 1 }, + { rdd: true, id: STATUSES.StatusBleeding, name: 'EFFECT.StatusBleeding', img: 'icons/svg/blood.svg' }, + { rdd: true, id: STATUSES.StatusProne, name: 'EFFECT.StatusProne', img: 'icons/svg/falling.svg' }, + { rdd: true, id: STATUSES.StatusGrappling, tint: '#33cc33', name: 'EFFECT.StatusGrappling', img: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.webp' }, + { rdd: true, id: STATUSES.StatusGrappled, tint: '#ff9900', name: 'EFFECT.StatusGrappled', img: 'systems/foundryvtt-reve-de-dragon/icons/empoignade.webp' }, + { rdd: true, id: STATUSES.StatusRestrained, name: 'EFFECT.StatusRestrained', img: 'icons/svg/net.svg' }, + { rdd: true, id: STATUSES.StatusUnconscious, name: 'EFFECT.StatusUnconscious', img: 'icons/svg/unconscious.svg' }, + { rdd: true, id: STATUSES.StatusBlind, name: 'EFFECT.StatusBlind', img: 'icons/svg/blind.svg' }, + { rdd: true, id: STATUSES.StatusComma, name: 'EFFECT.StatusComma', img: 'icons/svg/skull.svg' }, + { rdd: true, id: STATUSES.StatusDead, name: 'EFFECT.StatusDead', img: 'icons/svg/skull.svg' }, + { rdd: true, id: STATUSES.StatusDemiReve, name: 'EFFECT.StatusDemiReve', img: 'systems/foundryvtt-reve-de-dragon/icons/heures/hd12.svg' } ]; const demiReveStatusEffect = rddStatusEffects.find(it => it.id == STATUSES.StatusDemiReve); @@ -57,7 +57,7 @@ export class StatusEffects extends FormApplication { restricted: true }); - CONFIG.RDD.allEffects = rddStatusEffects.concat(CONFIG.statusEffects.filter(it => !rddEffectIds.includes(it.id))); + CONFIG.RDD.allEffects = rddStatusEffects.concat(CONFIG.statusEffects.filter(it => !rddEffectIds.includes(it.id))) StatusEffects._setUseStatusEffects(StatusEffects._getUseStatusEffects()); console.log('statusEffects', CONFIG.statusEffects); diff --git a/styles/simple.css b/styles/simple.css index f9eb048f..37d15512 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -613,6 +613,14 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) { max-height: 16px; border-width: 0; } +.button-effect-info { + vertical-align: baseline; + width: 1.4rem; + height: 1.4rem; + background-color: var(--color-tooltip); + padding: 0.2em; + border-width: 0; +} .small-button-direction { max-height: 32px; max-width: 32px; diff --git a/templates/settings/status-effects.html b/templates/settings/status-effects.html index 11cbc058..c7f7a285 100644 --- a/templates/settings/status-effects.html +++ b/templates/settings/status-effects.html @@ -1,13 +1,13 @@