forked from public/foundryvtt-reve-de-dragon
Gestion d'items temporels
- Séparation des timestamp / calendrier Les poisons/maladies/souffles/queues/rencontres/signes peuvent être temporaires. - Ajout de champs pour stocker les timestamps de début et fin - définition de la durée (selon les items) - extraction des classes spécialisées des items - initialisation des dates de début/fin des effets temporaires à l'ajout d'un item temporel - préparation de la suppression automatique - Fix de mauvaise présentations sur les dialog d'astrologie et d'édition du calendrier
This commit is contained in:
56
templates/calendar-astrologie-template-table.html
Normal file
56
templates/calendar-astrologie-template-table.html
Normal file
@ -0,0 +1,56 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<div class="header-fields">
|
||||
<h1 class="charname">Horoscope</h1>
|
||||
</div>
|
||||
</header>
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<table class='table-nombres-astraux'>
|
||||
<tr class='table-nombres-astraux-td'>
|
||||
<th>Date</th>
|
||||
{{#each astrologieData as |nombreData key|}}
|
||||
<td class='table-nombres-astraux-td'>{{nombreData.date.jour}}{{timestamp-imgSigneHeure nombreData.date.mois}}</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
<tr class='table-nombres-astraux-td'>
|
||||
<th>Nombre astral</th>
|
||||
{{#each astrologieData as |nombreData key|}}
|
||||
<td class='table-nombres-astraux-td'>
|
||||
<ol>
|
||||
<b>{{nombreData.nombreAstral}}</b>
|
||||
{{#each nombreData.valeursFausses as |fausseVal key|}}
|
||||
<li>{{fausseVal.actorName}} - {{fausseVal.nombreAstral}}</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>+4</strong></td>
|
||||
<td><strong>+2</strong></td>
|
||||
<td><strong>-2</strong></td>
|
||||
<td><strong>-4</strong></td>
|
||||
</tr>
|
||||
{{#each heuresParActeur as |heuresDef name|}}
|
||||
<tr>
|
||||
<td><strong>{{name}}</strong>:</td>
|
||||
{{#each heuresDef as |ajustement|}}
|
||||
<td>
|
||||
{{#each ajustement.heures as |heure|}}
|
||||
{{timestamp-imgSigneHeure heure}}
|
||||
{{/each}}
|
||||
</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
@ -4,47 +4,49 @@
|
||||
<h1 class="charname">Horoscope</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<table class='table-nombres-astraux'>
|
||||
<tr class='table-nombres-astraux-td'>
|
||||
<th>Date</th>
|
||||
{{#each astrologieData as |nombreData key|}}
|
||||
<td class='table-nombres-astraux-td'>{{nombreData.humanDate}}</td>
|
||||
<td class='table-nombres-astraux-td'>{{nombreData.date.jour}}{{timestamp-imgSigneHeure nombreData.date.mois}}</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
<tr class='table-nombres-astraux-td'>
|
||||
<th>Nombre astral</th>
|
||||
{{#each astrologieData as |nombreData key|}}
|
||||
<td class='table-nombres-astraux-td'>
|
||||
<ol>
|
||||
<b>{{nombreData.nombreAstral}}</b>
|
||||
{{#each nombreData.valeursFausses as |fausseVal key|}}
|
||||
<li>{{fausseVal.actorName}} - {{fausseVal.nombreAstral}}</li>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</td>
|
||||
{{/each}}
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
<ul class="alterne-list">
|
||||
{{#each heuresParActeur as |heuresDef name|}}
|
||||
<li><strong>{{name}} </strong></li>
|
||||
<ul class="list-item-margin1">
|
||||
{{#each heuresDef as |heure idx|}}
|
||||
<li><strong>{{heure.value}}</strong> :
|
||||
{{#each heure.heures as |heureName idx|}}
|
||||
{{heureName}}
|
||||
<li class="list-item flexrow">
|
||||
<span><strong>{{name}}</strong>:</span>
|
||||
<span class="flex-grow-2">
|
||||
|{{#each heuresDef as |ajustement|}}
|
||||
<span>
|
||||
{{#each ajustement.heures as |heure|}}
|
||||
{{timestamp-imgSigneHeure heure}}
|
||||
{{/each}}
|
||||
|
|
||||
</span>
|
||||
{{/each}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</span>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</form>
|
||||
|
@ -8,44 +8,36 @@
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label for="annee">Année</label>
|
||||
<input type="text" name="annee" value="{{annee}}" data-dtype="Number" min="0"/>
|
||||
<div class="flexcol flex-shrink">
|
||||
<label for="jourMois">Jour</label>
|
||||
<input type="number" class="number-x4" name="jourMois" value="{{jourMois}}" data-dtype="Number" min="1" max="28"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<label for="nomMois">Mois</label>
|
||||
<select name="nomMois" data-dtype="String">
|
||||
{{#select nomMois}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexcol flex-shrink">
|
||||
<label for="annee">Année</label>
|
||||
<input type="number" class="number-x4" name="annee" value="{{annee}}" data-dtype="Number" min="0"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="mois">Mois</label>
|
||||
<select name="nomMois" data-dtype="String">
|
||||
{{#select nomMois}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="jour">Jour du mois </label>
|
||||
<select name="jourMois" data-dtype="String">
|
||||
{{#select jourMois}}
|
||||
{{#each jourMoisOptions as |key|}}
|
||||
<option value={{key}}>{{numberFormat key decimals=0}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="heure">Heure Draconique</label>
|
||||
<select name="nomHeure" data-dtype="String">
|
||||
{{#select nomHeure}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="minutesRelative">Minutes</label>
|
||||
<select name="minutesRelative" data-dtype="String">
|
||||
{{#select minutesRelative}}
|
||||
{{#each minutesOptions as |key|}}
|
||||
<option value={{key}}>{{numberFormat key decimals=0}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<div class="flexcol">
|
||||
<label for="nomHeure">Heure</label>
|
||||
<select name="nomHeure" data-dtype="String">
|
||||
{{#select nomHeure}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="flexcol flex-shrink">
|
||||
<label for="minutesRelative">Minutes</label>
|
||||
<input type="number" class="number-x4" name="minutesRelative" value="{{minutesRelative}}" data-dtype="Number" min="0" max="119"/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div id="calendar-time-container">
|
||||
<div class="calendar">
|
||||
{{#if isGM}}
|
||||
<i class="calendar-btn calendar-btn-edit fas fa-cog" title="Editer"></i>
|
||||
<i class="calendar-btn astrologie-btn-edit fas fa-cog" title="Astrologie"></i>
|
||||
<i class="calendar-btn-edit fas fa-cog" title="Editer"></i>
|
||||
<i class="astrologie-btn-edit fas fa-cog" title="Astrologie"></i>
|
||||
{{/if}}
|
||||
<div class="calendar-hdr">
|
||||
<p id="calendar-move-handle" class="calendar-date-rdd" title="Deplacer">Jour {{jourMois}} de {{nomMois}} ({{nomSaison}})</p>
|
||||
|
3
templates/common/enum-duree.hbs
Normal file
3
templates/common/enum-duree.hbs
Normal file
@ -0,0 +1,3 @@
|
||||
{{#each (timestamp-formulesDuree) as |duree|}}
|
||||
<option value="{{duree.code}}">{{duree.label}}</option>
|
||||
{{/each}}
|
23
templates/common/timestamp.hbs
Normal file
23
templates/common/timestamp.hbs
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="flexcol">
|
||||
<div class="flexrow">
|
||||
<label>{{label}}</label>
|
||||
<input {{#if disabled}}{{disabled}}{{/if}} type="number" class="flex-shrink number-x2" name="{{path}}.jour" value="{{jour}}" data-dtype="Number" min="1" max="28"/>
|
||||
{{timestamp-imgSigne mois}}
|
||||
<select {{#if disabled}}{{disabled}}{{/if}} name="{{path}}.mois" class="flex-shrink" data-dtype="String">
|
||||
{{#select mois.key}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<input {{#if disabled}}{{disabled}}{{/if}} type="number" class="number-x2" name="{{path}}.annee" value="{{annee}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<label>à l'heure de</label>
|
||||
{{timestamp-imgSigne heure}}
|
||||
<select {{#if disabled}}{{disabled}}{{/if}} name="{{path}}.heure" class="flex-shrink" data-dtype="String">
|
||||
{{#select heure.key}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<input {{#if disabled}}{{disabled}}{{/if}} type="number" class="number-x2" name="{{path}}.minute" value="{{minute}}" data-dtype="Number"/>
|
||||
</div>
|
||||
</div>
|
9
templates/enum-formuleduree.html
Normal file
9
templates/enum-formuleduree.html
Normal file
@ -0,0 +1,9 @@
|
||||
<option value=""></option>
|
||||
<option value="hn">Fin de l'Heure de Naissance</option>
|
||||
<option value="1h">Une heure</option>
|
||||
<option value="12h">12 heures</option>
|
||||
<option value="chateaudormant">Fin Chateau dormant</option>
|
||||
<option value="12chateau">12 heures après Chateau Dormant</option>
|
||||
<option value="1ddr">Un dé draconique jours</option>
|
||||
<option value="special">Spéciale</option>
|
||||
|
@ -14,35 +14,37 @@
|
||||
<section class="sheet-body">
|
||||
{{#if (or isGM system.identifie)}}
|
||||
<div class="form-group">
|
||||
<label for="xp">Identifiée ? </label>
|
||||
<label for="system.identifie">Identifiée ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Malignité </label>
|
||||
<label for="system.malignite">Malignité </label>
|
||||
<input class="attribute-value" type="text" name="system.malignite" value="{{system.malignite}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Périodicité</label>
|
||||
<label for="system.periodicite">Périodicité</label>
|
||||
<input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Dommages</label>
|
||||
<label for="system.dommages">Dommages</label>
|
||||
<input class="attribute-value" type="text" name="system.dommages" value="{{system.dommages}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Remedes Connus ? </label>
|
||||
<label for="system.remedesconnus">Remedes Connus ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
||||
</div>
|
||||
{{#if (or isGM system.remedesconnus)}}
|
||||
<div class="form-group">
|
||||
<label for="xp">Remèdes </label>
|
||||
<label for="system.remedes">Remèdes </label>
|
||||
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (and isGM isOwned)}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contractée" labelfin="Prochain jet"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
</form>
|
||||
|
@ -13,37 +13,40 @@
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label for="xp">Actif ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.active" {{#if system.active}}checked{{/if}}/>
|
||||
<label for="system.active">Actif ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.active" {{#if system.active}}checked{{/if}} {{#unless isGM}}disabled{{/unless}}/>
|
||||
</div>
|
||||
{{#if (or isGM system.identifie)}}
|
||||
<div class="form-group">
|
||||
<label for="xp">Identifiée ? </label>
|
||||
<label for="system.identifie">Identifiée ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Malignité </label>
|
||||
<label for="system.malignite">Malignité </label>
|
||||
<input class="attribute-value" type="text" name="system.malignite" value="{{system.malignite}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Périodicité</label>
|
||||
<label for="system.periodicite">Périodicité</label>
|
||||
<input class="attribute-value" type="text" name="system.periodicite" value="{{system.periodicite}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Dommages</label>
|
||||
<label for="system.dommages">Dommages</label>
|
||||
<input class="attribute-value" type="text" name="system.dommages" value="{{system.dommages}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="xp">Remedes Connus ? </label>
|
||||
<label for="system.remedesconnus">Remedes Connus ? </label>
|
||||
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
||||
</div>
|
||||
{{#if (or isGM system.remedesconnus)}}
|
||||
<div class="form-group">
|
||||
<label for="xp">Remèdes </label>
|
||||
<label for="system.remedes">Remèdes </label>
|
||||
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#if (and isGM isOwned system.active)}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contracté" labelfin="Prochain jet"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||
|
||||
|
@ -85,15 +85,9 @@
|
||||
<label>Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<select name="splitDate.day" class="enchanteDate" data-dtype="String">
|
||||
{{#select splitDate.day}}
|
||||
{{#each jourMoisOptions as |key|}}
|
||||
<option value="{{key}}">{{numberFormat key decimals=0}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
<select name="splitDate.month" class="enchanteDate" data-dtype="String">
|
||||
{{#select splitDate.month}}
|
||||
<input type="number" name="enchantement.jour" class="date-enchantement" value="{{enchantement.jour}}" data-dtype="Number" min="1" max="28"/>
|
||||
<select name="enchantement.mois" class="date-enchantement" data-dtype="String">
|
||||
{{#select enchantement.mois}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
|
@ -19,11 +19,24 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="system.duree">Durée</label>
|
||||
<select name="system.duree" data-dtype="String">
|
||||
{{#select system.duree}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/common/enum-duree.hbs"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="system.refoulement">Refoulement</label>
|
||||
<input class="attribute-value" type="text" name="system.refoulement" value="{{system.refoulement}}" data-dtype="Number"/>
|
||||
</div>
|
||||
|
||||
{{#if isOwned}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||
|
@ -27,6 +27,7 @@
|
||||
<input class="attribute-value" type="text" name="system.heure" value="{{system.heure}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||
</div>
|
||||
</div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Rencontrée le" labelfin="Disparaît le"}}
|
||||
{{else}}
|
||||
<div class="form-group">
|
||||
<label for="system.formule">Rêve</label>
|
||||
|
@ -2,6 +2,18 @@
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label for="system.duree">Durée</label>
|
||||
<select name="system.duree" data-dtype="String">
|
||||
{{#select system.duree}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/common/enum-duree.hbs"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{#if isOwned}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
||||
{{/if}}
|
||||
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-hautrevant.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-frequence.html"}}
|
||||
|
17
templates/item/temporel.hbs
Normal file
17
templates/item/temporel.hbs
Normal file
@ -0,0 +1,17 @@
|
||||
<div class="form-group">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/common/timestamp.hbs"
|
||||
(timestamp-extract system.temporel.debut)
|
||||
path='system.temporel.debut'
|
||||
label=(either labeldebut 'Date début')
|
||||
disabled=''
|
||||
}}
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/common/timestamp.hbs"
|
||||
(timestamp-extract system.temporel.fin)
|
||||
path='system.temporel.fin'
|
||||
label=(either labelfin 'Date fin')
|
||||
disabled=''
|
||||
}}
|
||||
</div>
|
Reference in New Issue
Block a user