diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js index 32bb13ea..23aa64d0 100644 --- a/module/rdd-calendrier.js +++ b/module/rdd-calendrier.js @@ -285,8 +285,12 @@ export class RdDCalendrier extends Application { } /* -------------------------------------------- */ - async positionnerHeure(indexHeure) { - await this.setNewTimestamp(new RdDTimestamp({ indexDate: this.timestamp.indexDate + (this.timestamp.heure < indexHeure ? 0 : 1) }).addHeures(indexHeure)) + async positionnerHeure(heure) { + 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) { - return heure + (this.getCurrentNombreAstral() ?? 1) - 1; + return heure + (this.getCurrentNombreAstral() ?? 0); } /* -------------------------------------------- */ @@ -428,9 +432,9 @@ export class RdDCalendrier extends Application { updateDisplay() { let calendrier = this.fillCalendrierData(); // 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) { - dateHTML = dateHTML + " - NA: " + (this.getCurrentNombreAstral() ?? "?"); + dateHTML = dateHTML + "
Nombre Astral: " + (this.getCurrentNombreAstral() ?? "?"); } for (let handle of document.getElementsByClassName("calendar-date-rdd")) { handle.innerHTML = dateHTML; diff --git a/module/rdd-timestamp.js b/module/rdd-timestamp.js index d9ca9b80..831e48e1 100644 --- a/module/rdd-timestamp.js +++ b/module/rdd-timestamp.js @@ -250,7 +250,7 @@ export class RdDTimestamp { const heure = this.heure + heures; return new RdDTimestamp({ 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 }) } diff --git a/styles/simple.css b/styles/simple.css index f22bda8a..d3f97b21 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1518,7 +1518,7 @@ div.competence-column div.categorie-competence{ grid-row: 1; grid-column: 1; width: fit-content; - height: 84px; + height: 6rem; margin: 0; padding: 0; border: 1px solid #000; @@ -1530,9 +1530,9 @@ div.competence-column div.categorie-competence{ .calendar-hdr{ display: grid; font-size: 1rem; - margin: 3px; - padding: 4px; - height: 25px; + margin: 0.1rem; + padding: 0.2rem; + height: fit-content; width: fit-content; min-width: 200px; border-bottom: 1px solid #111; @@ -1544,7 +1544,6 @@ div.competence-column div.categorie-competence{ color: #CCC; opacity: 90; font-size: 0.9rem; - line-height: 1px; text-align: center; padding: 0; margin: 0; @@ -1597,7 +1596,7 @@ div.competence-column div.categorie-competence{ padding-bottom: 20px; } .calendar-btn-container-left{ - width: 20%; + width: 25%; display: grid; float: left; margin: 2px; @@ -1605,7 +1604,7 @@ div.competence-column div.categorie-competence{ color: rgba(0, 0, 0, 0.5); } .calendar-btn-container-right{ - width: 20%; + width: 15%; display: grid; float: right; margin: 2px; @@ -1628,54 +1627,55 @@ div.competence-column div.categorie-competence{ } .calendar-1min{ - grid-row: 1; + grid-row: 1; grid-column: 1; + margin-left: 0.2rem; } .calendar-5min{ - grid-row: 1; + grid-row: 1; grid-column: 2; } -.calendar-10min{ - 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-column: 1; - height: fit-content; - text-align: center; - vertical-align: center; -} - -.calendar-vaisseau{ - grid-row: 1; - grid-column: 2; - height: fit-content; - text-align: center; - vertical-align: center; +.calendar-15min{ + grid-row: 1; + grid-column: 3; + margin-right: 0.2rem; } .calendar-30min{ - grid-row: 2; + grid-row: 2; grid-column: 1; - height: fit-content; - text-align: center; - vertical-align: center; + margin-left: 0.2rem; +} + +.calendar-60min{ + grid-row: 2; + grid-column: 2; } .calendar-1heure{ - grid-row: 2; - grid-column: 2; - height: fit-content; - text-align: center; - vertical-align: center; + grid-row: 2; + grid-column: 3; + margin-right: 0.2rem; +} + +.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{ @@ -1692,17 +1692,16 @@ div.competence-column div.categorie-competence{ margin: auto; color: #CCC; } -.calendar-weekday{ +.calendar-weekday { grid-column: 1; grid-row: 1; text-align: center; + font-size: 1.1rem; margin: auto; - border-bottom: 1px solid #111; } .calendar-time{ grid-column: 1; grid-row: 2; - font-size: 1.1rem; text-align: center; margin: auto; cursor: pointer; diff --git a/system.json b/system.json index e404b2ef..6c67b242 100644 --- a/system.json +++ b/system.json @@ -1,8 +1,8 @@ { "id": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", - "version": "10.5.1", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.5.1.zip", + "version": "10.5.2", + "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", "compatibility": { "minimum": "10", diff --git a/templates/calendar-template.html b/templates/calendar-template.html index 8a72183f..00c21972 100644 --- a/templates/calendar-template.html +++ b/templates/calendar-template.html @@ -1,8 +1,8 @@
{{#if isGM}} - - + + {{/if}}

{{jourDuMois}} {{mois.label}} ({{mois.saison}})

@@ -10,10 +10,12 @@
{{#if isGM}}
- - - - + +1 + +5 + +15 + +30 + +60 + +1h
{{else}}
@@ -30,10 +32,12 @@
{{#if isGM}}
- - - - + + Avancer à Lyre + + + Avancer au Vaisseau +
{{/if}}
diff --git a/templates/common/timestamp.hbs b/templates/common/timestamp.hbs index 2aa19b6a..3295e4c3 100644 --- a/templates/common/timestamp.hbs +++ b/templates/common/timestamp.hbs @@ -15,7 +15,7 @@
- +
-
- - -
{{>"systems/foundryvtt-reve-de-dragon/templates/common/timestamp.hbs" (timestamp-extract timestamp) - path='chronologie' - label='Date en jeu' + path='chronologie' + label='Date en jeu' disabled='' }}
@@ -39,5 +35,9 @@ {{/select}}
+
+ + +
\ No newline at end of file