Merge pull request 'v10.5.2' (#606) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10
Reviewed-on: #606
This commit is contained in:
commit
7e75715d88
@ -285,8 +285,12 @@ export class RdDCalendrier extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async positionnerHeure(indexHeure) {
|
async positionnerHeure(heure) {
|
||||||
await this.setNewTimestamp(new RdDTimestamp({ indexDate: this.timestamp.indexDate + (this.timestamp.heure < indexHeure ? 0 : 1) }).addHeures(indexHeure))
|
const indexDate = this.timestamp.indexDate;
|
||||||
|
const addDay = this.timestamp.heure < heure ? 0 : 1;
|
||||||
|
await this.setNewTimestamp(new RdDTimestamp({
|
||||||
|
indexDate: indexDate + addDay, indexHeure: 0 })
|
||||||
|
.addHeures(heure))
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -355,7 +359,7 @@ export class RdDCalendrier extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getHeureChance(heure) {
|
getHeureChance(heure) {
|
||||||
return heure + (this.getCurrentNombreAstral() ?? 1) - 1;
|
return heure + (this.getCurrentNombreAstral() ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -428,9 +432,9 @@ export class RdDCalendrier extends Application {
|
|||||||
updateDisplay() {
|
updateDisplay() {
|
||||||
let calendrier = this.fillCalendrierData();
|
let calendrier = this.fillCalendrierData();
|
||||||
// Rebuild text du calendrier
|
// Rebuild text du calendrier
|
||||||
let dateHTML = `${calendrier.jourDuMois} ${calendrier.mois.label} ${calendrier.annee} (${calendrier.mois.saison})`
|
let dateHTML = `${calendrier.jourDuMois} ${calendrier.mois.label} (${calendrier.mois.saison}) de l'année ${calendrier.annee}`
|
||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
dateHTML = dateHTML + " - NA: " + (this.getCurrentNombreAstral() ?? "?");
|
dateHTML = dateHTML + "<br>Nombre Astral: " + (this.getCurrentNombreAstral() ?? "?");
|
||||||
}
|
}
|
||||||
for (let handle of document.getElementsByClassName("calendar-date-rdd")) {
|
for (let handle of document.getElementsByClassName("calendar-date-rdd")) {
|
||||||
handle.innerHTML = dateHTML;
|
handle.innerHTML = dateHTML;
|
||||||
|
@ -250,7 +250,7 @@ export class RdDTimestamp {
|
|||||||
const heure = this.heure + heures;
|
const heure = this.heure + heures;
|
||||||
return new RdDTimestamp({
|
return new RdDTimestamp({
|
||||||
indexDate: this.indexDate + Math.floor(heure / RDD_HEURES_PAR_JOUR),
|
indexDate: this.indexDate + Math.floor(heure / RDD_HEURES_PAR_JOUR),
|
||||||
indexMinute: (this.indexMinute + (heure % RDD_HEURES_PAR_JOUR)) % (RDD_MINUTES_PAR_JOUR)
|
indexMinute: this.indexMinute + (heure % RDD_HEURES_PAR_JOUR) * RDD_MINUTES_PAR_HEURES
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1518,7 +1518,7 @@ div.competence-column div.categorie-competence{
|
|||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
height: 84px;
|
height: 6rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px solid #000;
|
border: 1px solid #000;
|
||||||
@ -1530,9 +1530,9 @@ div.competence-column div.categorie-competence{
|
|||||||
.calendar-hdr{
|
.calendar-hdr{
|
||||||
display: grid;
|
display: grid;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin: 3px;
|
margin: 0.1rem;
|
||||||
padding: 4px;
|
padding: 0.2rem;
|
||||||
height: 25px;
|
height: fit-content;
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
border-bottom: 1px solid #111;
|
border-bottom: 1px solid #111;
|
||||||
@ -1544,7 +1544,6 @@ div.competence-column div.categorie-competence{
|
|||||||
color: #CCC;
|
color: #CCC;
|
||||||
opacity: 90;
|
opacity: 90;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
line-height: 1px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -1597,7 +1596,7 @@ div.competence-column div.categorie-competence{
|
|||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
.calendar-btn-container-left{
|
.calendar-btn-container-left{
|
||||||
width: 20%;
|
width: 25%;
|
||||||
display: grid;
|
display: grid;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
@ -1605,7 +1604,7 @@ div.competence-column div.categorie-competence{
|
|||||||
color: rgba(0, 0, 0, 0.5);
|
color: rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
.calendar-btn-container-right{
|
.calendar-btn-container-right{
|
||||||
width: 20%;
|
width: 15%;
|
||||||
display: grid;
|
display: grid;
|
||||||
float: right;
|
float: right;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
@ -1630,52 +1629,53 @@ div.competence-column div.categorie-competence{
|
|||||||
.calendar-1min{
|
.calendar-1min{
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
|
margin-left: 0.2rem;
|
||||||
}
|
}
|
||||||
.calendar-5min{
|
.calendar-5min{
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
grid-column: 2;
|
grid-column: 2;
|
||||||
}
|
}
|
||||||
.calendar-10min{
|
.calendar-15min{
|
||||||
grid-row: 2;
|
|
||||||
grid-column: 1;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-20min{
|
|
||||||
grid-row: 2;
|
|
||||||
grid-column: 2;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-lyre{
|
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
grid-column: 1;
|
grid-column: 3;
|
||||||
height: fit-content;
|
margin-right: 0.2rem;
|
||||||
text-align: center;
|
|
||||||
vertical-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendar-vaisseau{
|
|
||||||
grid-row: 1;
|
|
||||||
grid-column: 2;
|
|
||||||
height: fit-content;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-30min{
|
.calendar-30min{
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
height: fit-content;
|
margin-left: 0.2rem;
|
||||||
text-align: center;
|
}
|
||||||
vertical-align: center;
|
|
||||||
|
.calendar-60min{
|
||||||
|
grid-row: 2;
|
||||||
|
grid-column: 2;
|
||||||
}
|
}
|
||||||
.calendar-1heure{
|
.calendar-1heure{
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
grid-column: 2;
|
grid-column: 3;
|
||||||
height: fit-content;
|
margin-right: 0.2rem;
|
||||||
text-align: center;
|
}
|
||||||
vertical-align: center;
|
|
||||||
|
.calendar-lyre{
|
||||||
|
grid-row: 1;
|
||||||
|
grid-column: 1;
|
||||||
|
margin-left: 0.2rem;
|
||||||
|
margin-right: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.calendar-vaisseau{
|
||||||
|
grid-row: 2;
|
||||||
|
grid-column: 1;
|
||||||
|
margin-left: 0.2rem;
|
||||||
|
margin-right: 0.2rem;
|
||||||
|
}
|
||||||
|
.img-calendar-forward{
|
||||||
|
color: rgba(255, 255, 255, 0.5);
|
||||||
|
vertical-align: bottom;
|
||||||
|
max-width: 1.2em;
|
||||||
|
max-height: 1.2em;
|
||||||
|
border-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calendar-btn-container-left:hover{
|
.calendar-btn-container-left:hover{
|
||||||
@ -1692,17 +1692,16 @@ div.competence-column div.categorie-competence{
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
color: #CCC;
|
color: #CCC;
|
||||||
}
|
}
|
||||||
.calendar-weekday{
|
.calendar-weekday {
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
font-size: 1.1rem;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
border-bottom: 1px solid #111;
|
|
||||||
}
|
}
|
||||||
.calendar-time{
|
.calendar-time{
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
grid-row: 2;
|
grid-row: 2;
|
||||||
font-size: 1.1rem;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"id": "foundryvtt-reve-de-dragon",
|
"id": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"version": "10.5.1",
|
"version": "10.5.2",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.5.1.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.5.2.zip",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div id="calendar-time-container">
|
<div id="calendar-time-container">
|
||||||
<div class="calendar">
|
<div class="calendar">
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<i class="calendar-btn-edit fas fa-cog" title="Editer"></i>
|
<i class="calendar-btn-edit fa-solid fa-calendar-pen" title="Editer"></i>
|
||||||
<i class="astrologie-btn-edit fas fa-cog" title="Astrologie"></i>
|
<i class="astrologie-btn-edit fa-solid fa-moon-over-sun" title="Astrologie"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="calendar-hdr">
|
<div class="calendar-hdr">
|
||||||
<p id="calendar-move-handle" class="calendar-date-rdd" title="Deplacer">{{jourDuMois}} {{mois.label}} ({{mois.saison}})</p>
|
<p id="calendar-move-handle" class="calendar-date-rdd" title="Deplacer">{{jourDuMois}} {{mois.label}} ({{mois.saison}})</p>
|
||||||
@ -10,10 +10,12 @@
|
|||||||
<div class="calendar-container">
|
<div class="calendar-container">
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<div class="calendar-btn-container-left">
|
<div class="calendar-btn-container-left">
|
||||||
<i class="calendar-btn calendar-1min fas fa-angle-right" data-calendar-avance="1" title="Avancer de 1 minute"></i>
|
<i class="calendar-btn calendar-1min" data-calendar-avance="1" title="Avancer de 1 minute">+1</i>
|
||||||
<i class="calendar-btn calendar-5min fas fa-angle-double-right" data-calendar-avance="5" title="Avancer de 5 minutes"></i>
|
<i class="calendar-btn calendar-5min" data-calendar-avance="5" title="Avancer de 5 minutes">+5</i>
|
||||||
<i class="calendar-btn calendar-10min fas fa-play" data-calendar-avance="10" title="Avancer de 10 minutes"></i>
|
<i class="calendar-btn calendar-15min" data-calendar-avance="15" title="Avancer de 15 minutes">+15</i>
|
||||||
<i class="calendar-btn calendar-20min fas fa-step-forward" data-calendar-avance="20" title="Avancer de 20 minutes"></i>
|
<i class="calendar-btn calendar-30min" data-calendar-avance="30" title="Avancer de 30 minutes">+30</i>
|
||||||
|
<i class="calendar-btn calendar-60min" data-calendar-avance="60" title="Avancer de 60 minutes" >+60</i>
|
||||||
|
<i class="calendar-btn calendar-1heure" data-calendar-avance="120" title="Avancer d'1 heure" >+1h</i>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="calendar-btn-container-left">
|
<div class="calendar-btn-container-left">
|
||||||
@ -30,10 +32,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#if isGM}}
|
{{#if isGM}}
|
||||||
<div class="calendar-btn-container-right">
|
<div class="calendar-btn-container-right">
|
||||||
<i class="calendar-btn calendar-30min fas fa-forward" data-calendar-avance="30" title="Avancer de 30 minutes" ></i>
|
<i class="calendar-btn calendar-lyre fas fa-forward" data-calendar-set="6" title="Avancer à Lyre">
|
||||||
<i class="calendar-btn calendar-1heure fas fa-fast-forward" data-calendar-avance="120" title="Avancer d'1 heure" ></i>
|
<img class="img-calendar-forward" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd07.svg" alt="Avancer à Lyre"/>
|
||||||
<i class="calendar-btn calendar-vaisseau fas fa-sun" data-calendar-set="0" title="Avancer au Vaisseau"></i>
|
</i>
|
||||||
<i class="calendar-btn calendar-lyre fas fa-moon" data-calendar-set="6" title="Avancer à Lyre"></i>
|
<i class="calendar-btn calendar-vaisseau fas fa-forward" data-calendar-set="0" title="Avancer au Vaisseau">
|
||||||
|
<img class="img-calendar-forward" src="systems/foundryvtt-reve-de-dragon/icons/heures/hd01.svg" alt="Avancer au Vaisseau"/>
|
||||||
|
</i>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<label></label>
|
<label></label>
|
||||||
<label>à l'heure de</label>
|
<label>heure</label>
|
||||||
<select {{#if disabled}}{{disabled}}{{/if}} name="{{path}}.heure" class="flex-shrink" data-dtype="String">
|
<select {{#if disabled}}{{disabled}}{{/if}} name="{{path}}.heure" class="flex-shrink" data-dtype="String">
|
||||||
{{#select heure.key}}
|
{{#select heure.key}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
<label for="auteur">Auteur</label>
|
<label for="auteur">Auteur</label>
|
||||||
<input type="text" name="auteur" value="{{auteur}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="text" name="auteur" value="{{auteur}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label for="information">Information</label>
|
|
||||||
<textarea autocomplete="off" title="Information" name="information">{{information}}</textarea>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/common/timestamp.hbs"
|
{{>"systems/foundryvtt-reve-de-dragon/templates/common/timestamp.hbs"
|
||||||
(timestamp-extract timestamp)
|
(timestamp-extract timestamp)
|
||||||
@ -39,5 +35,9 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="information">Information</label>
|
||||||
|
<textarea autocomplete="off" title="Information" name="information" autofocus>{{information}}</textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
Loading…
Reference in New Issue
Block a user