diff --git a/module/rdd-timestamp.js b/module/rdd-timestamp.js index 4fb70d84..f23c4151 100644 --- a/module/rdd-timestamp.js +++ b/module/rdd-timestamp.js @@ -10,8 +10,8 @@ const RDD_MOIS_PAR_AN = 12; export const RDD_JOURS_PAR_MOIS = 28; export const RDD_HEURES_PAR_JOUR = 12; export const MAX_NOMBRE_ASTRAL = 12; -const RDD_MINUTES_PAR_HEURES = 120; -const RDD_MINUTES_PAR_JOUR = 1440; //RDD_HEURES_PAR_JOUR * RDD_MINUTES_PAR_HEURES; +export const RDD_MINUTES_PAR_HEURES = 120; +export const RDD_MINUTES_PAR_JOUR = 1440; //RDD_HEURES_PAR_JOUR * RDD_MINUTES_PAR_HEURES; const ROUNDS_PAR_MINUTE = 10; const DEFINITION_HEURES = [ @@ -252,7 +252,8 @@ export class RdDTimestamp { get heure() { return Math.floor(this.indexMinute / RDD_MINUTES_PAR_HEURES) } get minute() { return this.indexMinute % RDD_MINUTES_PAR_HEURES } get round() { return ROUNDS_PAR_MINUTE * (this.indexMinute - Math.floor(this.indexMinute)) } - get pourcentageDuJour() { return this.indexMinute / RDD_MINUTES_PAR_JOUR } + get angleHeure() { return this.indexMinute / RDD_MINUTES_PAR_JOUR * 360 - 60 } + get angleMinute() { return this.indexMinute / RDD_MINUTES_PAR_HEURES * 360 + 45} formatDate() { const jour = this.jour + 1; diff --git a/module/sommeil/app-astrologie.js b/module/sommeil/app-astrologie.js index cc7aef76..53deec80 100644 --- a/module/sommeil/app-astrologie.js +++ b/module/sommeil/app-astrologie.js @@ -1,6 +1,6 @@ import { SYSTEM_RDD } from "../constants.js"; import { Misc } from "../misc.js"; -import { RdDTimestamp } from "../rdd-timestamp.js"; +import { RDD_MINUTES_PAR_HEURES, RDD_MINUTES_PAR_JOUR, RdDTimestamp } from "../rdd-timestamp.js"; export const APP_ASTROLOGIE_REFRESH = `${SYSTEM_RDD}-refresh-astrologie` @@ -128,7 +128,7 @@ export class AppAstrologie extends Application { }) this.html.find('[name="jet-astrologie"]').click(event => this.requestJetAstrologie()); this.html.find('[name="rebuild-nombres-astraux"]').click(event => this.rebuildNombresAstraux()); - + this.onCalculThemeAstral(); } @@ -155,30 +155,30 @@ export class AppAstrologie extends Application { RdDTimestamp.definitions().forEach(dh => { const ajustement = RdDTimestamp.ajustementAstrologiqueHeure(heureNaissance, chiffreAstral, dh.heure + 1); const txtAjustement = ajustement == 0 ? '' : Misc.toSignedString(ajustement); - this.html.find(`div.astro-ajustement.ajustement-${dh.hh}`).text(txtAjustement) + this.html.find(`div.astro-ajustement.heure-${dh.hh}`).text(txtAjustement) }); this.html.find(`select[name="signe-astral"]`).val(this.appData.theme.signeAstral.key) this.html.find(`select[name="signe-naissance"]`).val(this.appData.theme.signeNaissance.key) - const angleAstrologie = ((chiffreAstral + heureNaissance) * 30) % 360; + const angleAstrologie = ((chiffreAstral + heureNaissance) * 30) % 360 - 45; this.html.find(`div.astro-roue div.astro-disque img`).css(this.cssRotation(angleAstrologie)); - + const timestamp = game.system.rdd.calendrier.getTimestamp(); - const angleHeure = timestamp.pourcentageDuJour * 360 - this.html.find(`div.astro-roue div.astro-horloge img`).css(this.cssRotation(angleHeure)); + + this.html.find(`div.astro-roue div.astro-horloge-heure img`).css(this.cssRotation(timestamp.angleHeure)); + this.html.find(`div.astro-roue div.astro-horloge-minute img`).css(this.cssRotation(timestamp.angleMinute)); } cssRotation(angleAstrologie) { const rotation = `rotate(${angleAstrologie}deg)`; - const cssRotation = { + return { 'transform': rotation, '-ms-transform': rotation, '-moz-transform': rotation, '-webkit-transform': rotation, '-o-transform': rotation }; - return cssRotation; } requestJetAstrologie() { diff --git a/styles/img/ui/rdd-aiguille-horloge.svg b/styles/img/ui/rdd-aiguille-horloge.svg index 4331e6fc..1cd80e3c 100644 --- a/styles/img/ui/rdd-aiguille-horloge.svg +++ b/styles/img/ui/rdd-aiguille-horloge.svg @@ -1,68 +1,20 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/styles/img/ui/rdd-aiguille-minute.svg b/styles/img/ui/rdd-aiguille-minute.svg new file mode 100644 index 00000000..90a8426f --- /dev/null +++ b/styles/img/ui/rdd-aiguille-minute.svg @@ -0,0 +1,17 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/styles/simple.css b/styles/simple.css index eeaa4aff..01c3c55b 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -78,15 +78,15 @@ --gradient-purple-black: linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7)); --gradient-silver-light: linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2)); --gradient-daylight: conic-gradient( - from 315deg, - hsla(50, 20%, 30%, 0.1) , - hsla(50, 30%, 60%, 0.7) 25%, - hsla(50, 20%, 30%, 0.1) 50%, - hsla(250, 20%, 30%, 0.1) 50%, - hsla(250, 30%, 60%, 0.7) 75%, - hsla(250, 20%, 30%, 0.1) + from 0deg, + hsla(50, 50%, 80%, 0.7), + hsla(50, 50%, 80%, 0.1) 25%, + hsla(250, 50%, 20%, 0.1) 25%, + hsla(250, 50%, 20%, 0.5) 50%, + hsla(250, 50%, 20%, 0.1) 75%, + hsla(50, 50%, 80%, 0.1) 75%, + hsla(50, 50%, 80%, 0.7) ); - --gradient-daylight2: radial-gradient(210deg, hsla(50, 30%, 60%, 0.6), hsla(50, 20%, 30%, 0.1) 50%, hsla(250, 20%, 30%, 0.1) 50%, hsla(250, 30%, 60%, 0.6)); --background-custom-button: linear-gradient(to bottom, rgba(33, 55, 74, 0.988) 5%, rgba(21, 40, 51, 0.671) 100%); --background-custom-button-hover: linear-gradient(to bottom, rgb(128, 0, 0) 5%, rgb(62, 1, 1) 100%); @@ -885,29 +885,46 @@ div.astro-roue { } div.astro-roue div.astro-heure { position: absolute; - width: 2rem; - height: 2rem; + width: 1.8rem; + height: 1.8rem; } div.astro-roue div.astro-cercle1 { position: absolute; background: var(--gradient-daylight); border: 0.2rem solid rgba(100, 45, 124, 0.6); + border-radius: calc(6rem); + top: calc(50% - 6rem); + left: calc(50% - 6rem); + width: calc(100% - 1rem); + height: calc(100% - 1rem); +} +div.astro-roue div.astro-cercle2 { + position: absolute; + border: 0.1rem solid rgba(100, 45, 124, 0.4); border-radius: calc(6.1rem); - top: calc(50% - 6.1rem); - left: calc(50% - 6.1rem); - width: calc(100% - 0.8rem); - height: calc(100% - 0.8rem); + top: calc(50% - 4.5rem); + left: calc(50% - 4.5rem); + width: calc(100% - 4rem); + height: calc(100% - 4rem); } div.astro-roue div.astro-disque { position: absolute; border: none; - top: calc(50% - 4rem); - left: calc(50% - 4rem); - width: calc(100% - 5rem); - height: calc(100% - 5rem); + top: calc(50% - 3.4rem); + left: calc(50% - 3.4rem); + width: calc(100% - 6.2rem); + height: calc(100% - 6.2rem); } -div.astro-roue div.astro-horloge { +div.astro-roue div.astro-horloge-heure { + position: absolute; + border: none; + top: calc(50% - 2.5rem); + left: calc(50% - 2.5rem); + width: calc(100% - 8rem); + height: calc(100% - 8rem); +} +div.astro-roue div.astro-horloge-minute { position: absolute; border: none; top: calc(50% - 3.5rem); @@ -915,7 +932,22 @@ div.astro-roue div.astro-horloge { width: calc(100% - 6rem); height: calc(100% - 6rem); } -div.astro-roue div:is(.astro-disque,.astro-horloge) img { border: none; } +div.astro-roue div.astro-ajustement { + position: absolute; + width: 0.8rem; + height: 0.8rem; + color: hsl(120, 50%, 15%); + font-size: 0.8rem; + text-align: center; + vertical-align: middle; + border-radius: 0.4rem; + background-color: hsla(300, 100%, 95%, 0.3); +} +div.astro-roue div.astro-disque img { border: none; } +div.astro-roue div:is(.astro-horloge-heure, .astro-horloge-minute) img { + border: none; + text-shadow: #403f3e; +} div.astro-roue div.astro-heure img.astro-heure-img { width: 2rem; height: 2rem; @@ -925,37 +957,32 @@ div.astro-roue div.astro-heure img.astro-heure-img { opacity: 0.9; border: none; } -div.astro-roue div.astro-heure.heure-12 { top: calc(50% - 1rem - 1.3rem); left: calc(50% - 1rem - 4.8rem); } -div.astro-roue div.astro-heure.heure-01 { top: calc(50% - 1rem - 3.5rem); left: calc(50% - 1rem - 3.5rem); } -div.astro-roue div.astro-heure.heure-02 { top: calc(50% - 1rem - 4.8rem); left: calc(50% - 1rem - 1.3rem); } -div.astro-roue div.astro-heure.heure-03 { top: calc(50% - 1rem - 4.8rem); left: calc(50% - 1rem + 1.3rem); } -div.astro-roue div.astro-heure.heure-04 { top: calc(50% - 1rem - 3.5rem); left: calc(50% - 1rem + 3.5rem); } -div.astro-roue div.astro-heure.heure-05 { top: calc(50% - 1rem - 1.3rem); left: calc(50% - 1rem + 4.8rem); } -div.astro-roue div.astro-heure.heure-06 { top: calc(50% - 1rem + 1.3rem); left: calc(50% - 1rem + 4.8rem); } -div.astro-roue div.astro-heure.heure-07 { top: calc(50% - 1rem + 3.5rem); left: calc(50% - 1rem + 3.5rem); } -div.astro-roue div.astro-heure.heure-08 { top: calc(50% - 1rem + 4.8rem); left: calc(50% - 1rem + 1.3rem); } -div.astro-roue div.astro-heure.heure-09 { top: calc(50% - 1rem + 4.8rem); left: calc(50% - 1rem - 1.3rem); } -div.astro-roue div.astro-heure.heure-10 { top: calc(50% - 1rem + 3.5rem); left: calc(50% - 1rem - 3.5rem); } -div.astro-roue div.astro-heure.heure-11 { top: calc(50% - 1rem + 1.3rem); left: calc(50% - 1rem - 4.8rem); } -div.astro-roue div.astro-ajustement { - position: absolute; - width: 1rem; - height: 1rem; -} +div.astro-roue div.astro-heure.heure-01 { top: calc(50% - 1rem + sin(-180deg) * 5rem); left: calc(50% - 1rem + cos(-180deg) * 5rem); } +div.astro-roue div.astro-heure.heure-02 { top: calc(50% - 1rem + sin(-150deg) * 5rem); left: calc(50% - 1rem + cos(-150deg) * 5rem); } +div.astro-roue div.astro-heure.heure-03 { top: calc(50% - 1rem + sin(-120deg) * 5rem); left: calc(50% - 1rem + cos(-120deg) * 5rem); } +div.astro-roue div.astro-heure.heure-04 { top: calc(50% - 1rem + sin(-90deg) * 5rem); left: calc(50% - 1rem + cos(-90deg) * 5rem); } +div.astro-roue div.astro-heure.heure-05 { top: calc(50% - 1rem + sin(-60deg) * 5rem); left: calc(50% - 1rem + cos(-60deg) * 5rem); } +div.astro-roue div.astro-heure.heure-06 { top: calc(50% - 1rem + sin(-30deg) * 5rem); left: calc(50% - 1rem + cos(-30deg) * 5rem); } +div.astro-roue div.astro-heure.heure-07 { top: calc(50% - 1rem + sin(-0deg) * 5rem); left: calc(50% - 1rem + cos(-0deg) * 5rem); } +div.astro-roue div.astro-heure.heure-08 { top: calc(50% - 1rem + sin(30deg) * 5rem); left: calc(50% - 1rem + cos(30deg) * 5rem); } +div.astro-roue div.astro-heure.heure-09 { top: calc(50% - 1rem + sin(60deg) * 5rem); left: calc(50% - 1rem + cos(60deg) * 5rem); } +div.astro-roue div.astro-heure.heure-10 { top: calc(50% - 1rem + sin(90deg) * 5rem); left: calc(50% - 1rem + cos(90deg) * 5rem); } +div.astro-roue div.astro-heure.heure-11 { top: calc(50% - 1rem + sin(120deg) * 5rem); left: calc(50% - 1rem + cos(120deg) * 5rem); } +div.astro-roue div.astro-heure.heure-12 { top: calc(50% - 1rem + sin(150deg) * 5rem); left: calc(50% - 1rem + cos(150deg) * 5rem); } -div.astro-roue div.astro-ajustement.ajustement-12 { top: calc(50% - 0.5rem - 0.8rem); left: calc(50% - 0.5rem - 2.9rem); } -div.astro-roue div.astro-ajustement.ajustement-01 { top: calc(50% - 0.5rem - 2.1rem); left: calc(50% - 0.5rem - 2.1rem); } -div.astro-roue div.astro-ajustement.ajustement-02 { top: calc(50% - 0.5rem - 2.9rem); left: calc(50% - 0.5rem - 0.8rem); } -div.astro-roue div.astro-ajustement.ajustement-03 { top: calc(50% - 0.5rem - 2.9rem); left: calc(50% - 0.5rem + 0.8rem); } -div.astro-roue div.astro-ajustement.ajustement-04 { top: calc(50% - 0.5rem - 2.1rem); left: calc(50% - 0.5rem + 2.1rem); } -div.astro-roue div.astro-ajustement.ajustement-05 { top: calc(50% - 0.5rem - 0.8rem); left: calc(50% - 0.5rem + 2.9rem); } -div.astro-roue div.astro-ajustement.ajustement-06 { top: calc(50% - 0.5rem + 0.8rem); left: calc(50% - 0.5rem + 2.9rem); } -div.astro-roue div.astro-ajustement.ajustement-07 { top: calc(50% - 0.5rem + 2.1rem); left: calc(50% - 0.5rem + 2.1rem); } -div.astro-roue div.astro-ajustement.ajustement-08 { top: calc(50% - 0.5rem + 2.9rem); left: calc(50% - 0.5rem + 0.8rem); } -div.astro-roue div.astro-ajustement.ajustement-09 { top: calc(50% - 0.5rem + 2.9rem); left: calc(50% - 0.5rem - 0.8rem); } -div.astro-roue div.astro-ajustement.ajustement-10 { top: calc(50% - 0.5rem + 2.1rem); left: calc(50% - 0.5rem - 2.1rem); } -div.astro-roue div.astro-ajustement.ajustement-11 { top: calc(50% - 0.5rem + 0.8rem); left: calc(50% - 0.5rem - 2.9rem); } +div.astro-roue div.astro-ajustement.heure-01 { top: calc(50% - 0.4rem + sin(180deg) * 3.9rem); left: calc(50% - 0.4rem + cos(180deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-02 { top: calc(50% - 0.4rem + sin(-150deg) * 3.9rem); left: calc(50% - 0.4rem + cos(-150deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-03 { top: calc(50% - 0.4rem + sin(-120deg) * 3.9rem); left: calc(50% - 0.4rem + cos(-120deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-04 { top: calc(50% - 0.4rem + sin(-90deg) * 3.9rem); left: calc(50% - 0.4rem + cos(-90deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-05 { top: calc(50% - 0.4rem + sin(-60deg) * 3.9rem); left: calc(50% - 0.4rem + cos(-60deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-06 { top: calc(50% - 0.4rem + sin(-30deg) * 3.9rem); left: calc(50% - 0.4rem + cos(-30deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-07 { top: calc(50% - 0.4rem + sin(0deg) * 3.9rem); left: calc(50% - 0.4rem + cos(0deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-08 { top: calc(50% - 0.4rem + sin(30deg) * 3.9rem); left: calc(50% - 0.4rem + cos(30deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-09 { top: calc(50% - 0.4rem + sin(60deg) * 3.9rem); left: calc(50% - 0.4rem + cos(60deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-10 { top: calc(50% - 0.4rem + sin(90deg) * 3.9rem); left: calc(50% - 0.4rem + cos(90deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-11 { top: calc(50% - 0.4rem + sin(120deg) * 3.9rem); left: calc(50% - 0.4rem + cos(120deg) * 3.9rem); } +div.astro-roue div.astro-ajustement.heure-12 { top: calc(50% - 0.4rem + sin(150deg) * 3.9rem); left: calc(50% - 0.4rem + cos(150deg) * 3.9rem); } .window-app .window-content, .window-app.sheet .window-content .sheet-body{ background: rgb(245,245,240) url(img/bg_left.webp) no-repeat left top; diff --git a/system.json b/system.json index 24786444..b6d427d9 100644 --- a/system.json +++ b/system.json @@ -1,8 +1,8 @@ { "id": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", - "version": "10.6.23", - "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.6.23.zip", + "version": "10.6.24", + "download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.6.24.zip", "manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json", "compatibility": { "minimum": "10", diff --git a/templates/item-potion-sheet.html b/templates/item-potion-sheet.html index 686e7cc7..8b786c5f 100644 --- a/templates/item-potion-sheet.html +++ b/templates/item-potion-sheet.html @@ -18,7 +18,7 @@
- +
- +
- {{#if isSoins}} -
- - -
-
- - -
-
- - -
- {{/if}} - {{#if isRepos}} -
- - -
-
- - -
-
- - -
-
- - -
- {{/if}} - {{#if system.magique}} -
- - -
-
- - -
- {{#if isSoins}} -
- - -
- {{/if}} -
- -
-
- - -
+ {{#if (or isSoins isRepos)}} +
+ + +
+
+ + +
+
+ + +
+ {{#if isRepos}} +
+ + +
+ {{/if}} + {{/if}} + {{#if system.magique}} +
+ + +
+
+ + +
+ {{#if (or isSoins isRepos)}} +
+ + +
+ {{/if}} +
+ +
+
+ + +
{{/if}} {{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}} diff --git a/templates/sommeil/astrologie-theme.hbs b/templates/sommeil/astrologie-theme.hbs index fb6948e9..e6f8ef23 100644 --- a/templates/sommeil/astrologie-theme.hbs +++ b/templates/sommeil/astrologie-theme.hbs @@ -21,15 +21,19 @@
+ {{#each heures as |heure|}} +
+
+ {{/each}} +
- {{#each heures as |heure|}} -
-
- {{/each}} -
+
+
+ +
\ No newline at end of file