Nouvelle visualisation des blessures

Extractions des parties de la feuille pour préparer la possibilité de
proposer une autre fiche
This commit is contained in:
Vincent Vandemeulebrouck 2022-09-26 02:23:07 +02:00
parent 4afa313ffc
commit 02ccb1f287
10 changed files with 139 additions and 193 deletions

View File

@ -244,7 +244,7 @@ export class RdDActorSheet extends ActorSheet {
}); });
// Blessure data // Blessure data
html.find('.blessures-soins').change(async event => { html.find('.blessure-soins').change(async event => {
const tr = $(event.currentTarget).parents(".item"); const tr = $(event.currentTarget).parents(".item");
let btype = tr.data('blessure-type'); let btype = tr.data('blessure-type');
let index = tr.data('blessure-index'); let index = tr.data('blessure-index');

View File

@ -119,8 +119,9 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-effects-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-effects-partial.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-combat.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessures.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessure.html',
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-queues.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-queues.html',
// Conteneur/item in Actor sheet // Conteneur/item in Actor sheet
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html', 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire.html',

View File

@ -252,6 +252,49 @@ table {border: 1px solid #7a7971;}
justify-content: center; justify-content: center;
text-align: left; text-align: left;
} }
.blessure-control {
flex-grow: 1;
flex-direction: row;
}
.blessure-soins {
flex-direction: row;
align-content: flex-start;
justify-content: flex-start;
margin-right: 2px;
margin-left: 2px;
padding: 2px;
}
input:is(.blessure-psdone, .blessure-scdone) {
width: 20px;
}
input:is(.blessure-premiers_soins, .blessure-soins_complets) {
width: calc(100% - 25px);
}
.blessure-jours {
flex-direction: row;
align-content: flex-start;
justify-content: flex-start;
}
.blessure-localisation {
flex-direction: row;
align-content: flex-start;
justify-content: flex-start;
}
.blessure-inactive {
color:rgba(150, 150, 150, 0.4);
}
.blessure-active-legere {
color:rgba(60, 60, 60, 0.9);
text-shadow: 1px 1px 4px rgba(60, 60, 60, 1);
}
.blessure-active-grave {
color: rgba(218, 126, 21, 0.9);
text-shadow: 1px 1px 4px rgba(60, 60, 60, 1);
}
.blessure-active-critique {
color: rgba(173, 36, 26, 0.9);
text-shadow: 1px 1px 4px rgba(60, 60, 60, 1);
}
.foundryvtt-reve-de-dragon .sheet-header { .foundryvtt-reve-de-dragon .sheet-header {
-webkit-box-flex: 0; -webkit-box-flex: 0;
@ -450,20 +493,6 @@ table {border: 1px solid #7a7971;}
border-bottom: 1px solid #BBB; border-bottom: 1px solid #BBB;
} }
.blessure-inactive {
color:rgba(150, 150, 150, 0.4)
}
.blessure-active-legere {
color:rgba(60, 60, 60, 0.9);
text-shadow: rgba(60, 60, 60, 0.7);
}
.blessure-active-grave {
color:rgba(218, 126, 21, 0.9);
}
.blessure-active-critique {
color:rgba(173, 36, 26, 0.9);
}
.foundryvtt-reve-de-dragon .items-list .item .item-image { .foundryvtt-reve-de-dragon .items-list .item .item-image {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-ms-flex: 0 0 24px; -ms-flex: 0 0 24px;
@ -926,23 +955,6 @@ ul, li {
.alchimie-title { .alchimie-title {
font-weight: bold; font-weight: bold;
} }
.blessure-data {
flex-direction: row;
align-content: flex-start;
justify-content: flex-start;
}
.blessures-soins {
flex-grow: 0;
flex-basis: 32px;
margin-right: 4px;
margin-left: 4px;
}
.blessures-loc {
flex-grow: 0;
flex-basis: 96px;
margin-right: 4px;
margin-left: 4px;
}
.pointsreve-value { .pointsreve-value {
flex-grow: 0; flex-grow: 0;
flex-basis: 64px; flex-basis: 64px;

View File

@ -1,27 +0,0 @@
<tr class="table-row alterne-row item" data-blessure-type="{{gravite}}" data-attribute={{key}} data-blessure-index="{{key}}" >
<td class="blessure-control" title="Blessure {{title}}" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-skull-crossbones blessure-active-{{gravite}}" name="blessure-{{gravite}}-{{key}}-active"></i>
{{else}}
<i class="fas fa-skull-crossbones blessure-inactive" name="blessure-{{gravite}}-{{key}}-active"></i>
{{/if}}
</td>
<td>
<input class="blessures-soins blessure-localisation" type="text" name="blessure-{{gravite}}-{{key}}-localisation" data-dtype="String" value="{{bless.loc}}"/>
</td>
<td>
<input class="blessures-soins blessure-premiers_soins" type="text" name="blessure-{{gravite}}-{{key}}-premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/>
</td>
<td>
<input class="blessures-soins blessure-psdone" name="blessure-{{gravite}}-{{key}}-psdone" type="checkbox" name="bless.psdone" {{#if bless.psdone}}checked{{/if}}/>
</td>
<td>
<input class="blessures-soins blessure-soins_complets" type="text" name="blessure-{{gravite}}-{{key}}-soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/>
</td>
<td>
<input class="blessures-soins blessure-scdone" name="blessure-{{gravite}}-{{key}}-scdone" type="checkbox" name="bless.scdone" {{#if bless.scdone}}checked{{/if}}/>
</td>
<td>
<input class="blessures-soins blessure-jours" type="text" name="blessure-{{gravite}}-{{key}}-jours" name="jours" data-dtype="number" value="{{bless.jours}}"/>
</td>
</tr>

View File

@ -121,7 +121,7 @@
{{!-- blessures Tab --}} {{!-- blessures Tab --}}
<div class="tab blessures" data-group="primary" data-tab="blessures" style="height:200px"> <div class="tab blessures" data-group="primary" data-tab="blessures" style="height:200px">
{{!-- Liste de blessures --}} {{!-- Liste de blessures --}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessures.html" this}}
</div> </div>
{{!-- Equipment Tab --}} {{!-- Equipment Tab --}}

View File

@ -1,28 +0,0 @@
<h3>Blessures:</h3>
<table class="table-container" role="table">
<thead>
<tr class="competence-header competence-title competence-label" >
<th></th>
<th>Loc.</th>
<th>Premiers soins</th>
<th>P.S. OK?</th>
<th>Soins complets</th>
<th>S.C. OK?</th>
<th>Age (jours)</th>
</tr>
</thead>
<tbody>
<tr class="table-row alterne-row" ><td/><td colspan="4">Légères</td></tr>
{{#each system.blessures.legeres.liste as |bless key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="legere" title="Légère"}}
{{/each}}
<tr class="table-row alterne-row"><td/><td colspan="4">Graves</td></tr>
{{#each system.blessures.graves.liste as |bless key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="grave" title="Grave"}}
{{/each}}
<tr class="table-row alterne-row"><td/><td colspan="4">Critiques</td></tr>
{{#each system.blessures.critiques.liste as |bless key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html" bless=bless key=key gravite="critique" title="Critique"}}
{{/each}}
</tbody>
</table>

View File

@ -0,0 +1,27 @@
<li class="item flexrow list-item {{#if blessure.active}}blessure-active-{{gravite}}{{else}}blessure-inactive{{/if}}"
data-blessure-type="{{gravite}}"
data-attribute={{key}}
data-blessure-index="{{key}}"
data-blessure-active="{{blessure.active}}">
<span class="blessure-control" title="Blessure {{title}}">
<i class="fas fa-skull-crossbones" name="blessure-{{gravite}}-{{key}}-active"></i>
{{title}}
</span>
{{#if blessure.active}}
<span class="blessure-soins flexrow">
<input class="blessure-psdone" name="blessure-{{gravite}}-{{key}}-psdone" type="checkbox" name="blessure.psdone" {{#if blessure.psdone}}checked{{/if}}/>
<input class="blessure-premiers_soins" type="text" name="blessure-{{gravite}}-{{key}}-premiers_soins" data-dtype="number" value="{{blessure.premiers_soins}}"/>
</span>
<span class="blessure-soins flexrow">
<input class="blessure-scdone" name="blessure-{{gravite}}-{{key}}-scdone" type="checkbox" name="blessure.scdone" {{#if blessure.scdone}}checked{{/if}}/>
<input class="blessure-soins_complets" type="text" name="blessure-{{gravite}}-{{key}}-soins_complets" data-dtype="number" value="{{blessure.soins_complets}}"/>
</span>
<input class="blessure-jours" type="text" name="blessure-{{gravite}}-{{key}}-jours" name="jours" data-dtype="number" value="{{blessure.jours}}"/>
<input class="blessure-localisation" type="text" name="blessure-{{gravite}}-{{key}}-localisation" data-dtype="String" value="{{blessure.loc}}"/>
{{else}}
<span></span>
<span></span>
<span></span>
<span></span>
{{/if}}
</li>

View File

@ -0,0 +1,19 @@
<h3>Blessures:</h3>
<ul class="item-list alterne-list">
<li class="competence-header flexrow" >
<span>Blessure</span>
<span>Premiers soins</span>
<span>Soins complets</span>
<span>Age (jours)</span>
<span>Localisation</span>
</li>
{{#each system.blessures.legeres.liste as |blessure key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessure.html" blessure=blessure key=key gravite="legere" title="Légère"}}
{{/each}}
{{#each system.blessures.graves.liste as |blessure key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessure.html" blessure=blessure key=key gravite="grave" title="Grave"}}
{{/each}}
{{#each system.blessures.critiques.liste as |blessure key|}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessure.html" blessure=blessure key=key gravite="critique" title="Critique"}}
{{/each}}
</ul>

View File

@ -0,0 +1,41 @@
<h3 class="blessures-title">Armes et Défenses:</h3>
<ul class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="competence-title competence-label">Armes</span>
<span class="competence-title competence-label">Initiative</span>
<span class="competence-title competence-label">Comp.</span>
<span class="competence-title competence-value">Niveau</span>
<span class="competence-title competence-value">+dom</span>
</li>
{{#each combat as |arme key|}}
<li class="item flexrow list-item" data-item-id="{{arme._id}}"
data-arme-name="{{arme.name}}" data-competence-name="{{arme.system.competence}}" >
<span class="arme-label">
<a>
{{#if arme.img}}
<img class="sheet-competence-img" src="{{arme.img}}"/>
{{/if}}
<span>{{arme.name}}</span>
</a>
</span>
<span class="arme-initiative"><a>{{arme.system.initiative}}</a></span>
<span class="competence-label">{{arme.system.competence}}</span>
<span class="competence-value">{{numberFormat arme.system.niveau decimals=0 sign=true}}</span>
<span class="competence-value">{{numberFormat arme.system.dommagesReels decimals=0 sign=true}}</span>
</li>
{{/each}}
{{#each esquives as |esq key|}}
<li class="item flexrow list-item" data-item-id="{{esq._id}}">
<span class="competence-label">
<a class="competence-label" name="{{esq.name}}">
<img class="sheet-competence-img" src="{{esq.img}}"/>
<span>{{esq.name}}</span>
</a>
</span>
<span class="arme-initiative"></span>
<span class="competence-label"></span>
<span class="competence-value">{{numberFormat esq.system.niveau decimals=0 sign=true}}</span>
<span class="competence-value"></span>
</li>
{{/each}}
</ul>

View File

@ -273,110 +273,11 @@
{{!-- Combat Tab --}} {{!-- Combat Tab --}}
<div class="tab combat" data-group="primary" data-tab="combat"> <div class="tab combat" data-group="primary" data-tab="combat">
<h3 class="blessures-title">Armes et Défenses:</h3> {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-combat.html" this}}<hr>
<ul class="item-list alterne-list"> {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-blessures.html" this}}
<li class="competence-header flexrow"> {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-maladies-poisons.html" this}}
<span class="competence-title competence-label">Armes</span> {{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-possessions.html" this}}
<span class="competence-title competence-label">Initiative</span>
<span class="competence-title competence-label">Comp.</span>
<span class="competence-title competence-value">Niveau</span>
<span class="competence-title competence-value">+dom</span>
</li>
{{#each combat as |arme key|}}
<li class="item flexrow list-item" data-item-id="{{arme._id}}"
data-arme-name="{{arme.name}}" data-competence-name="{{arme.system.competence}}" >
<span class="arme-label">
<a>
{{#if arme.img}}
<img class="sheet-competence-img" src="{{arme.img}}"/>
{{/if}}
<span>{{arme.name}}</span>
</a>
</span>
<span class="arme-initiative"><a>{{arme.system.initiative}}</a></span>
<span class="competence-label">{{arme.system.competence}}</span>
<span class="competence-value">{{numberFormat arme.system.niveau decimals=0 sign=true}}</span>
<span class="competence-value">{{numberFormat arme.system.dommagesReels decimals=0 sign=true}}</span>
</li>
{{/each}}
{{#each esquives as |esq key|}}
<li class="item flexrow list-item" data-item-id="{{esq._id}}">
<span class="competence-label">
<a class="competence-label" name="{{esq.name}}">
<img class="sheet-competence-img" src="{{esq.img}}"/>
<span>{{esq.name}}</span>
</a>
</span>
<span class="arme-initiative"></span>
<span class="competence-label"></span>
<span class="competence-value">{{numberFormat esq.system.niveau decimals=0 sign=true}}</span>
<span class="competence-value"></span>
</li>
{{/each}}
</ul>
<hr>
{{!-- Liste de blessures --}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html" this}}
{{#if maladiesPoisons.length}}
{{!-- Maladies & Poison --}}
<h3 class="blessures-title">Maladies & Poisons:</h3>
<ul class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="competence-title flex-grow competence-label">Nom</span>
<span class="competence-title competence-label">Type</span>
<span class="competence-title competence-value">Remèdes</span>
<span class="competence-title flex-grow competence-value">Edition</span>
</li>
{{#each maladiesPoisons as |maladie key|}}
<li class="item flexrow list-item" data-item-id="{{maladie._id}}">
<span class="competence-label">
{{#if (or @root.options.isGM maladie.system.identifie)}}
{{maladie.name}}
{{else}}
Inconnue
{{/if}}
</span>
<span class="competence-label">{{maladie.type}}</span>
<span class="competence-label">
{{#if (or @root.options.isGM maladie.system.remedesconnus)}}
{{maladie.system.remedes}}
{{else}}
Remèdes Inconnus
{{/if}}
</span>
<div class="item-controls">
<a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
{{#if possessions.length}}
{{!-- Possession --}}
<h3 class="blessures-title">Possession:</h3>
<ul class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="competence-title flex-grow competence-label">Nom</span>
<span class="competence-title competence-label">Type</span>
</li>
{{#each possessions as |possession key|}}
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
<span class="competence-label">
<a class="sheet-possession-attack">{{possession.name}} (Conjurer)</a>
</span>
<span class="competence-label">{{possession.system.type}}</span>
<div class="item-controls">
<a class="item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
</div> </div>
{{!-- Connaissances Tab --}} {{!-- Connaissances Tab --}}