#1 : Edition des champs position TMR et points de Refoulement si MJ

This commit is contained in:
sladecraven 2020-11-04 18:00:42 +01:00
parent ed16553ace
commit bb1c2b8e89
4 changed files with 117 additions and 103 deletions

View File

@ -116,6 +116,7 @@ export class RdDActorSheet extends ActorSheet {
data.data.ombres = this._checkNull(data.itemsByType['ombre']); data.data.ombres = this._checkNull(data.itemsByType['ombre']);
data.data.tetes = this._checkNull(data.itemsByType['tete']); data.data.tetes = this._checkNull(data.itemsByType['tete']);
data.data.competenceByCategory = data.competenceByCategory; data.data.competenceByCategory = data.competenceByCategory;
data.data.isGM = game.user.isGM;
return data; return data;
} }

View File

@ -2,10 +2,10 @@
"name": "foundryvtt-reve-de-dragon", "name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT", "description": "Rêve de Dragon RPG for FoundryVTT",
"version": "0.9.17", "version": "0.9.20",
"minimumCoreVersion": "0.6.0", "minimumCoreVersion": "0.6.0",
"compatibleCoreVersion": "0.6.6", "compatibleCoreVersion": "0.6.6",
"templateVersion": 37, "templateVersion": 38,
"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

@ -7,6 +7,7 @@
}, },
"background": { "background": {
"biographie": "Histoire personnelle...", "biographie": "Histoire personnelle...",
"notes": "Notes",
"yeux": "", "yeux": "",
"cheveux": "", "cheveux": "",
"poids": "", "poids": "",

View File

@ -43,7 +43,6 @@
<a class="item" data-tab="blessurescompteurs">Blessures/Compteurs</a> <a class="item" data-tab="blessurescompteurs">Blessures/Compteurs</a>
<a class="item" data-tab="hautreve">Haut-Rêve</a> <a class="item" data-tab="hautreve">Haut-Rêve</a>
<a class="item" data-tab="items">Equipement</a> <a class="item" data-tab="items">Equipement</a>
<a class="item" data-tab="queuesouffle">Queues, Souffles et Têtes</a>
<a class="item" data-tab="description">Description</a> <a class="item" data-tab="description">Description</a>
</nav> </nav>
@ -275,62 +274,110 @@
{{!-- Compteurs/Blessures Tab --}} {{!-- Compteurs/Blessures Tab --}}
<div class="tab blessurescompteurs" data-group="primary" data-tab="blessurescompteurs"> <div class="tab blessurescompteurs" data-group="primary" data-tab="blessurescompteurs">
<ol class="item-list"> <div class="flex-group-left flexrow">
{{#each data.compteurs as |compteur key|}} <ol class="item-list">
<li class="item flexrow""> {{#each data.compteurs as |compteur key|}}
<span class="arme-label">{{compteur.label}}</span> <li class="item flexrow"">
{{#if compteur.isInput}} <span class="arme-label">{{compteur.label}}</span>
<input class="stress-value stress-style compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/> {{#if compteur.isInput}}
{{#if compteur.isStress}} <input class="stress-value stress-style compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
<a class="item-control stress-test" id="stress-test" title="Faire un jet de Stress">Faire un jet de Stress</a> {{#if compteur.isStress}}
{{else}} <a class="item-control stress-test" id="stress-test" title="Faire un jet de Stress">Faire un jet de Stress</a>
<label></label> {{else}}
{{/if}} <label></label>
<label></label> {{/if}}
{{else}} <label></label>
<span class="competence-label">{{compteur.value}}</span> {{else}}
{{/if}} <span class="competence-label">{{compteur.value}}</span>
</li> {{/if}}
{{/each}} </li>
</ol> {{/each}}
<span class="blessures-title">Blessures Légeres :</span> </ol>
<div class="blessure-data"> </div>
{{#each data.blessures.legeres.liste as |bless key|}} <div class="flex-group-left flexcol competence-column">
<li class="item flexrow blessure-data" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}"> <span class="blessures-title">Blessures Légeres :</span>
<a class="item-control blessure-control" title="Blessure Légère" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a> <div class="blessure-data">
Premiers soins <input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{this.premiers_soins}}"/> - {{#each data.blessures.legeres.liste as |bless key|}}
Soins complets <input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{this.soins_complets}}"/> - <li class="item flexrow blessure-data" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}">
Jours <input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{this.jours}}"/> - <a class="item-control blessure-control" title="Blessure Légère" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
Loc. <input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{this.localisation}}"/> Premiers soins <input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{this.premiers_soins}}"/> -
</li> Soins complets <input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{this.soins_complets}}"/> -
{{/each}} Jours <input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{this.jours}}"/> -
Loc. <input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{this.localisation}}"/>
</li>
{{/each}}
</div>
<span class="blessures-title">Blessures Graves :</span>
<div>
{{#each data.blessures.graves.liste as |bless key|}}
<li class="item flexrow" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}" >
<a class="item-control blessure-control" title="Blessure Grave" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
Premiers soins <input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> -
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> -
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> -
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.localisation}}"/>
</li>
{{/each}}
</div>
<span class="blessures-title">Blessure Critique :</span>
<div>
{{#each data.blessures.critiques.liste as |bless key|}}
<li class="item flexrow" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}" >
<a class="item-control blessure-control" title="Blessure Critique" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
Premiers soins <input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> -
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> -
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> -
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.localisation}}"/>
</li>
</li>
{{/each}}
</div>
</div> </div>
<span class="blessures-title">Blessures Graves :</span>
<div> <div>
{{#each data.blessures.graves.liste as |bless key|}} <span><strong>Queues:</strong></span>
<li class="item flexrow" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}" > {{#each data.queues as |queue key|}}
<a class="item-control blessure-control" title="Blessure Grave" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a> <li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
Premiers soins <input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> - <span class="queuesouffle-label"> <a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> - <div class="item-controls">
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> - <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.localisation}}"/> </div>
</li> </li>
{{/each}} {{/each}}
</div> </div>
<span class="blessures-title">Blessure Critique :</span>
<div> <div>
{{#each data.blessures.critiques.liste as |bless key|}} <span><strong>Souffles:</strong></span>
<li class="item flexrow" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}" > {{#each data.souffles as |souffle key|}}
<a class="item-control blessure-control" title="Blessure Critique" data-blessure-active="{{bless.active}}">{{#if bless.active}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a> <li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
Premiers soins <input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> - <span class="queuesouffle-label"> <a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
Soins complets <input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> - <div class="item-controls">
Jours <input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> - <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
Loc. <input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.localisation}}"/> </div>
</li>
</li> </li>
{{/each}} {{/each}}
</div> </div>
</div> <div>
<span><strong>Tetes:</strong></span>
{{#each data.tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</div>
<div>
<span><strong>Ombres de Thanatos:</strong></span>
{{#each data.ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</div>
</div>
{{!-- hautreve Tab --}} {{!-- hautreve Tab --}}
<div class="tab hautreve" data-group="primary" data-tab="hautreve" style="height:200px"> <div class="tab hautreve" data-group="primary" data-tab="hautreve" style="height:200px">
@ -343,8 +390,13 @@
<div> <div>
<ol class="item-list"> <ol class="item-list">
<li class="item flexrow" >Points de Rêve actuels : <input class="pointsreve-value flexrow" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number"/></li> <li class="item flexrow" >Points de Rêve actuels : <input class="pointsreve-value flexrow" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number"/></li>
{{#if data.isGM}}
<li class="item flexrow" >Position en TMR : <input class="description-value flexrow" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/></li>
<li class="item flexrow" >Refoulement : <input class="description-value flexrow" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/></li>
{{else}}
<li class="item flexrow" >Position en TMR : {{data.reve.tmrpos.coord}} </li> <li class="item flexrow" >Position en TMR : {{data.reve.tmrpos.coord}} </li>
<li class="item flexrow" >Refoulement : {{data.reve.refoulement.value}} </li> <li class="item flexrow" >Refoulement : {{data.reve.refoulement.value}} </li>
{{/if}}
</ol> </ol>
</div> </div>
<div> <div>
@ -389,54 +441,6 @@
</ol> </ol>
</div> </div>
{{!-- queue/tete/souffle Tab --}}
<div class="tab queuesouffle" data-group="primary" data-tab="queuesouffle" style="height:200px">
<div>
<span><strong>Queues:</strong></span>
{{#each data.queues as |queue key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</div>
<div>
<span><strong>Souffles:</strong></span>
{{#each data.souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</div>
<div>
<span><strong>Tetes:</strong></span>
{{#each data.tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</div>
<div>
<span><strong>Ombres de Thanatos:</strong></span>
{{#each data.ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</div>
</div>
{{!-- Biography Tab --}} {{!-- Biography Tab --}}
<div class="tab biography" data-group="primary" data-tab="description"> <div class="tab biography" data-group="primary" data-tab="description">
<div class="grid grid-2col"> <div class="grid grid-2col">
@ -456,12 +460,20 @@
<li class="item flexrow" ><span class="description-label">Beauté : </span><input class="description-value flexrow" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String"/></li> <li class="item flexrow" ><span class="description-label">Beauté : </span><input class="description-value flexrow" type="text" name="data.beaute" value="{{data.beaute}}" data-dtype="String"/></li>
<li class="item flexrow" ><span class="description-label">Main directrice : </span><input class="description-value flexrow" type="text" name="data.main" value="{{data.main}}" data-dtype="String"/></li> <li class="item flexrow" ><span class="description-label">Main directrice : </span><input class="description-value flexrow" type="text" name="data.main" value="{{data.main}}" data-dtype="String"/></li>
</ol> </ol>
</div> </div>
</div> </div>
<div class="form-group" style="height:200px"> <div class="flexcol flex-group-left">
<div class="form-group editor" style="height:400px !important; min-height: 400px !important;"> <span><label>Biographie : </label></span>
{{editor content=data.biographie target="data.biographie" button=true owner=owner editable=editable}} <div class="form-group" style="height:200px">
<div class="form-group editor" style="height:400px !important; min-height: 400px !important;">
{{editor content=data.biographie target="data.biographie" button=true owner=owner editable=editable}}
</div>
</div>
<span><label>Notes : </label></span>
<div class="form-group" style="height:200px">
<div class="form-group editor" style="height:400px !important; min-height: 400px !important;">
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
</div>
</div> </div>
</div> </div>
</div> </div>