#76 Saisie des méditations

This commit is contained in:
sladecraven 2021-01-03 00:44:52 +01:00
parent c97ad8ec32
commit 55d49e8230
6 changed files with 81 additions and 3 deletions

View File

@ -47,7 +47,7 @@ export class RdDItemSheet extends ItemSheet {
async getData() { async getData() {
let data = super.getData(); let data = super.getData();
if ( data.item.type == 'tache' || data.item.type == 'livre') { if ( data.item.type == 'tache' || data.item.type == 'livre' || data.item.type == 'meditation') {
data.caracList = duplicate(game.system.model.Actor.personnage.carac); data.caracList = duplicate(game.system.model.Actor.personnage.carac);
data.competenceList = await RdDUtility.getCompetenceList( 'foundryvtt-reve-de-dragon.competences' ); data.competenceList = await RdDUtility.getCompetenceList( 'foundryvtt-reve-de-dragon.competences' );
} }

View File

@ -164,6 +164,7 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/item-tete-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-tete-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-ombre-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-ombre-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-monnaie-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-monnaie-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-meditation-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html', 'systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html', 'systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-base.html', 'systems/foundryvtt-reve-de-dragon/templates/competence-base.html',

View File

@ -5,7 +5,7 @@
"version": "1.2.0", "version": "1.2.0",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.8", "compatibleCoreVersion": "0.7.8",
"templateVersion": 76, "templateVersion": 77,
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",
"esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ],
"styles": ["styles/simple.css"], "styles": ["styles/simple.css"],

View File

@ -725,6 +725,7 @@
"veture": "", "veture": "",
"comportement": "", "comportement": "",
"tmr": "", "tmr": "",
"malus" : 0,
"description": "" "description": ""
}, },
"casetmr": { "casetmr": {

View File

@ -0,0 +1,76 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="form-group">
<label for="xp">Compétence</label>
<select name="data.competence" id="competenceselect" data-dtype="String">
{{#select item.data.competence}}
{{#each competenceList as |competence key|}}
<option value="{{competence.name}}">{{competence.name}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="form-group">
<label for="xp">Thème</label>
<input class="attribute-value" type="text" name="data.theme" value="{{data.theme}}" data-dtype="String"/>
</div>
<div class="form-group">
<label for="xp">Support</label>
<input class="attribute-value" type="text" name="data.support" value="{{data.support}}" data-dtype="String"/>
</div>
<div class="form-group">
<label for="xp">Heure</label>
<select name="data.defaut_carac" id="defaut_carac" data-dtype="String">
{{#select item.data.defaut_carac}}
{{>"systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html"}}
{{/select}}
</select>
</div>
<div class="form-group">
<label for="xp">Purification</label>
<input class="attribute-value" type="text" name="data.purification" value="{{data.purification}}" data-dtype="String"/>
</div>
<div class="form-group">
<label for="xp">Vêture</label>
<input class="attribute-value" type="text" name="data.veture" value="{{data.veture}}" data-dtype="String"/>
</div>
<div class="form-group">
<label for="xp">Comportement</label>
<input class="attribute-value" type="text" name="data.comportement" value="{{data.comportement}}" data-dtype="String"/>
</div>
<div class="form-group">
<label for="xp">Case TMR</label>
<select name="data.tmr" id="tmr" data-dtype="String">
{{#select item.data.tmr}}
<option value="cite">Cité</option>
<option value="collines">Collines</option>
<option value="desert">Désert</option>
<option value="desolation">Désolation</option>
<option value="fleuve">Fleuve</option>
<option value="foret">Forêt</option>
<option value="gouffre">Gouffre</option>
<option value="lac">Lac</option>
<option value="marais">Marais</option>
<option value="monts">Monts</option>
<option value="necropole">Nécropole</option>
<option value="plaines">Plaines</option>
<option value="pont">Pont</option>
<option value="sanctuaire">Sanctuaire</option>
{{/select}}
</select>
</div>
<span><label>Description : </label></span>
<div class="form-group editor" style="min-height: 400px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</section>
</form>

View File

@ -21,7 +21,7 @@
<div class="form-group"> <div class="form-group">
<label for="xp">Compétence</label> <label for="xp">Compétence</label>
<select name="data.competence" id="competenceselect" data-dtype="String"> <select name="data.competence" id="competenceselect" data-dtype="String">
{{#select item.data.competence}} {{#select item.data.competence}}
{{#each competenceList as |competence key|}} {{#each competenceList as |competence key|}}
<option value="{{competence.name}}">{{competence.name}}</option> <option value="{{competence.name}}">{{competence.name}}</option>
{{/each}} {{/each}}