Foundry v11/v12 support
This commit is contained in:
parent
915283a674
commit
db2ca2453e
@ -1149,6 +1149,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
finalLevel: 0,
|
||||
diffConditions: 0,
|
||||
ajustementsForce: CONFIG.RDD.difficultesLibres,
|
||||
config: game.system.rdd.config
|
||||
}
|
||||
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-ethylisme.html', rollData);
|
||||
new RdDRollDialogEthylisme(html, rollData, this, r => this.saouler(r.forceAlcool)).render(true);
|
||||
|
@ -38,7 +38,8 @@ export class RdDBaseActorSheet extends ActorSheet {
|
||||
description: await TextEditor.enrichHTML(this.actor.system.description, { async: true }),
|
||||
notesmj: await TextEditor.enrichHTML(this.actor.system.notesmj, { async: true }),
|
||||
options: RdDSheetUtility.mergeDocumentRights(this.options, this.actor, this.isEditable),
|
||||
effects: this.actor.effects
|
||||
effects: this.actor.effects,
|
||||
config: game.system.rdd.config
|
||||
}
|
||||
|
||||
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
||||
|
@ -8,3 +8,26 @@ export const SHOW_DICE = 'show';
|
||||
export const ENTITE_INCARNE = 'incarne';
|
||||
export const ENTITE_NONINCARNE = 'nonincarne';
|
||||
export const ENTITE_BLURETTE = 'blurette';
|
||||
|
||||
export const RDD_CONFIG = {
|
||||
niveauEthylisme : [
|
||||
{value: "1", label: "Aucun"},
|
||||
{value: "0", label: "Eméché (0)"},
|
||||
{value: "-1", label: "Gris (-1)"},
|
||||
{value: "-2", label: "Pinté (-2)"},
|
||||
{value: "-3", label: "Pas Frais (-3)"},
|
||||
{value: "-4", label: "Ivre (-4)"},
|
||||
{value: "-5", label: "Bu (-5)"},
|
||||
{value: "-6", label: "Complètement fait (-6)"},
|
||||
{value: "-7", label: "Ivre mort (-7)"}
|
||||
],
|
||||
categorieEntite: {
|
||||
"cauchemar": "Cauchemar",
|
||||
"reve": "Rêve"
|
||||
},
|
||||
typeEntite: {
|
||||
"incarne": "Incarnée",
|
||||
"nonincarne": "Non Incarnée",
|
||||
"blurette": "Blurette"
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID, RDD_CONFIG } from "./constants.js";
|
||||
import { Migrations } from './migrations.js';
|
||||
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
@ -108,6 +108,7 @@ export class SystemReveDeDragon {
|
||||
/* -------------------------------------------- */
|
||||
async onInit() {
|
||||
game.system.rdd = this;
|
||||
game.system.rdd.config = RDD_CONFIG;
|
||||
this.AppAstrologie = AppAstrologie;
|
||||
|
||||
|
||||
|
@ -55,9 +55,7 @@
|
||||
<li class="caracteristique flexrow list-item" data-tooltip="Niveau d'éthylisme">
|
||||
<label class="derivee-label" for="system.compteurs.ethylisme.value">{{system.compteurs.ethylisme.label}}</label>
|
||||
<select class="derivee-value" name="system.compteurs.ethylisme.value" data-dtype="Number">
|
||||
{{#select system.compteurs.ethylisme.value}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-niveau-ethylisme.html"}}
|
||||
{{/select}}
|
||||
{{selectOptions @root.config.niveauEthylisme selected=system.compteurs.ethylisme.value valueAttr="value" nameAttr="value" labelAttr="label"}}
|
||||
</select>
|
||||
</li>
|
||||
|
||||
|
@ -2,20 +2,13 @@
|
||||
<li class="caracteristique flexrow list-item">
|
||||
<span class="carac-label" name="catEntite">Catégorie : </span>
|
||||
<select name="system.definition.categorieentite" value="{{system.definition.categorieentite}}" data-dtype="String" {{#unless @root.options.vueDetaillee}}disabled{{/unless}}>
|
||||
{{#select system.definition.categorieentite}}
|
||||
<option value="cauchemar">Cauchemar</option>
|
||||
<option value="reve">Rêve</option>
|
||||
{{/select}}
|
||||
{{selectOptions @root.config.categorieEntite selected=system.definition.categorieentite}}
|
||||
</select>
|
||||
</li>
|
||||
<li class="caracteristique flexrow list-item">
|
||||
<span class="carac-label" name="typeEntite">Type d'entité : </span>
|
||||
<select name="system.definition.typeentite" value="{{system.definition.typeentite}}" data-dtype="String" {{#unless @root.options.vueDetaillee}}disabled{{/unless}}>
|
||||
{{#select system.definition.typeentite}}
|
||||
<option value="incarne">Incarnée</option>
|
||||
<option value="nonincarne">Non Incarnée</option>
|
||||
<option value="blurette">Blurette</option>
|
||||
{{/select}}
|
||||
{{selectOptions @root.config.typeEntite selected=system.definition.typeentite}}
|
||||
</select>
|
||||
</li>
|
||||
{{#each system.attributs as |attr key|}}
|
||||
|
Loading…
Reference in New Issue
Block a user