Fix: aucune oeuvre connu
La fenêtre de jet se comporte correctement si le personnage ne connait pas d'oeuvre
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
- défense contre possession
|
- défense contre possession
|
||||||
- correction du mode "méditation" quand le haut-rêvant ne connait pas de méditation
|
- correction du mode "méditation" quand le haut-rêvant ne connait pas de méditation
|
||||||
- correction du mode "jeu" quand le personnage ne connait pas de jeux
|
- correction du mode "jeu" quand le personnage ne connait pas de jeux
|
||||||
|
- correction du mode "oeuvre" quand le personnage ne connait pas d'oeuvres
|
||||||
- Corrections liées à Foundry v12/v13
|
- Corrections liées à Foundry v12/v13
|
||||||
- Fix ajout de notes dans le journal par un joueur (/chrono, ou clic sur le libelé de l'heure dans l'horloge)
|
- Fix ajout de notes dans le journal par un joueur (/chrono, ou clic sur le libelé de l'heure dans l'horloge)
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export class RollPartOeuvre extends RollPartSelect {
|
|||||||
async _onRender(rollDialog, context, options) {
|
async _onRender(rollDialog, context, options) {
|
||||||
const selectOeuvre = rollDialog.element.querySelector(`roll-section[name="${this.code}"] select[name="select-oeuvre"]`)
|
const selectOeuvre = rollDialog.element.querySelector(`roll-section[name="${this.code}"] select[name="select-oeuvre"]`)
|
||||||
|
|
||||||
selectOeuvre.addEventListener("change", e => {
|
selectOeuvre?.addEventListener("change", e => {
|
||||||
const selectOptions = e.currentTarget.options
|
const selectOptions = e.currentTarget.options
|
||||||
const index = selectOptions.selectedIndex
|
const index = selectOptions.selectedIndex
|
||||||
this.$selectOeuvre(rollDialog.rollData, selectOptions[index]?.value)
|
this.$selectOeuvre(rollDialog.rollData, selectOptions[index]?.value)
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ export class RollTypeOeuvre extends RollType {
|
|||||||
visible(rollData) { return rollData.active.actor.isPersonnage() }
|
visible(rollData) { return rollData.active.actor.isPersonnage() }
|
||||||
title(rollData) {
|
title(rollData) {
|
||||||
const current = rollData.current[PART_OEUVRE]
|
const current = rollData.current[PART_OEUVRE]
|
||||||
return `${current.art.action} ${current.label}`
|
if (current.art) {
|
||||||
|
return `${current.art.action} ${current.label}`
|
||||||
|
}
|
||||||
|
return 'interprête une oeuvre'
|
||||||
}
|
}
|
||||||
|
|
||||||
onSelect(rollData) {
|
onSelect(rollData) {
|
||||||
|
|||||||
@@ -2,15 +2,21 @@
|
|||||||
<img src="{{current.oeuvre.img}}" data-tooltip="{{current.oeuvre.name}}" />
|
<img src="{{current.oeuvre.img}}" data-tooltip="{{current.oeuvre.name}}" />
|
||||||
</roll-part-img>
|
</roll-part-img>
|
||||||
<roll-part-detail>
|
<roll-part-detail>
|
||||||
<subline>
|
{{#if refs.oeuvres}}
|
||||||
<select name="select-oeuvre" {{#if rollData.type.retry}}disabled{{/if}}>
|
<subline>
|
||||||
{{selectOptions refs.oeuvres selected=current.key valueAttr="key" labelAttr="label"}}
|
<select name="select-oeuvre" {{#if rollData.type.retry}}disabled{{/if}}>
|
||||||
</select>
|
{{selectOptions refs.oeuvres selected=current.key valueAttr="key" labelAttr="label"}}
|
||||||
|
</select>
|
||||||
|
{{#if current.oeuvre}}
|
||||||
|
<selected-numeric-value>{{plusMoins current.value}}</selected-numeric-value>
|
||||||
|
{{/if}}
|
||||||
|
</subline>
|
||||||
{{#if current.oeuvre}}
|
{{#if current.oeuvre}}
|
||||||
<selected-numeric-value>{{plusMoins current.value}}</selected-numeric-value>
|
{{> (concat 'roll-oeuvre-' current.oeuvre.type)}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</subline>
|
{{else}}
|
||||||
{{#if current.oeuvre}}
|
<subline>
|
||||||
{{> (concat 'roll-oeuvre-' current.oeuvre.type)}}
|
<p>Le personnage ne connait aucune œuvre à interpréter</p>
|
||||||
|
</subline>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</roll-part-detail>
|
</roll-part-detail>
|
||||||
Reference in New Issue
Block a user