Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
42179dab1d | |||
83631cd366 | |||
01cf47ad55 | |||
d492b37a45 | |||
ecdcdb69d5 | |||
8479fdda8a | |||
83e57fbbc7 | |||
2d256b1217 | |||
526d38d32e | |||
2ff3dfef89 | |||
f1b6c01cd7 | |||
675fe5838e | |||
bafdec9924 |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 193 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 716 KiB After Width: | Height: | Size: 716 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 634 KiB After Width: | Height: | Size: 634 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 637 KiB After Width: | Height: | Size: 637 KiB |
@ -1,4 +1,12 @@
|
|||||||
# 12.0
|
# 12.0
|
||||||
|
## 12.0.41 - La loupe d'Astrobazzarh
|
||||||
|
- On peut de nouveau effectuer des tirages cachés
|
||||||
|
- Le stress transformé est bien diminué lorsqu'on met le stress dans une compétence
|
||||||
|
|
||||||
|
## 12.0.40 - Les mains d'Astrobazzarh
|
||||||
|
- correction des attaques particulières en combat
|
||||||
|
- correction de message sur les min/max liés aux modificateurs de races (s'applique uniquement sur la taille)
|
||||||
|
|
||||||
## 12.0.39 - Les mains d'Astrobazzarh
|
## 12.0.39 - Les mains d'Astrobazzarh
|
||||||
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
|
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
|
||||||
- commande `/jet` pour poster une demande de jet de dés
|
- commande `/jet` pour poster une demande de jet de dés
|
||||||
|
2196
css/foundryvtt-reve-de-dragon.css
Normal file
37
gulpfile.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
const gulp = require('gulp');
|
||||||
|
const less = require('gulp-less');
|
||||||
|
|
||||||
|
function onError(err) {
|
||||||
|
util.log(util.colors.red.bold('[ERROR LESS]:'),util.colors.bgRed(err.message));
|
||||||
|
this.emit('end');
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Compile LESS
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
function compileLESS() {
|
||||||
|
return gulp.src("less/foundryvtt-reve-de-dragon.less")
|
||||||
|
.pipe(less()).on('error',console.log.bind(console))
|
||||||
|
.pipe(gulp.dest("./css"))
|
||||||
|
}
|
||||||
|
const css = gulp.series(compileLESS);
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Watch Updates
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
const SIMPLE_LESS = ["less/*.less"];
|
||||||
|
|
||||||
|
function watchUpdates() {
|
||||||
|
gulp.watch(SIMPLE_LESS, css);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Export Tasks
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
|
exports.default = gulp.series(
|
||||||
|
gulp.parallel(css),
|
||||||
|
watchUpdates
|
||||||
|
);
|
||||||
|
exports.css = css;
|
||||||
|
exports.watchUpdates = watchUpdates;
|
71
less/colors.less
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
:root {
|
||||||
|
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
|
||||||
|
--window-header-title-font-family: CaslonAntique;
|
||||||
|
--window-header-title-font-size: 1.6rem;
|
||||||
|
--window-header-title-font-weight: normal;
|
||||||
|
--window-header-title-color: #f5f5f5;
|
||||||
|
|
||||||
|
--major-button-font-family: CaslonAntique;
|
||||||
|
--major-button-font-size: 1.4rem;
|
||||||
|
--major-button-font-weight: normal;
|
||||||
|
--major-button-color: #dadada;
|
||||||
|
|
||||||
|
--tab-header-font-family: CaslonAntique;
|
||||||
|
--tab-header-font-size: 1.2rem;
|
||||||
|
--tab-header-font-weight: 700;
|
||||||
|
--tab-header-color: #403f3e;
|
||||||
|
--tab-header-color-active: #4a0404;
|
||||||
|
|
||||||
|
--actor-input-font-family: CaslonAntique;
|
||||||
|
--actor-input-font-size: 1.2rem;
|
||||||
|
--actor-input-font-weight: 500;
|
||||||
|
--actor-input-color: black;
|
||||||
|
|
||||||
|
--actor-label-font-family: CaslonAntique;
|
||||||
|
--actor-label-font-size: 1.2rem;
|
||||||
|
--actor-label-font-weight: 700;
|
||||||
|
--actor-label-color: #464331c4;
|
||||||
|
|
||||||
|
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
||||||
|
--debug-background-color-red: #ff000054;
|
||||||
|
--debug-background-color-blue: #1d00ff54;
|
||||||
|
--debug-background-color-green: #54ff0054;
|
||||||
|
|
||||||
|
--debug-box-shadow-red: inset 0 0 2px red;
|
||||||
|
--debug-box-shadow-blue: inset 0 0 2px blue;
|
||||||
|
--debug-box-shadow-green: inset 0 0 2px green;
|
||||||
|
|
||||||
|
/* =================== 3. some constants ============ */
|
||||||
|
--color-controls:rgba(0, 0, 0, 0.9);
|
||||||
|
--color-controls-light:hsla(0, 0%, 20%, 0.8);
|
||||||
|
--color-controls-hover:hsla(60, 100%, 75%, 0.7);
|
||||||
|
--color-control-border-hover:rgba(255, 128, 0, 0.8);
|
||||||
|
--color-gold: rgba(191, 149, 63, 0.8);
|
||||||
|
--gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3));
|
||||||
|
--gradient-silver: linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3));
|
||||||
|
--gradient-green: linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3));
|
||||||
|
--gradient-red: linear-gradient(150deg, rgba(255, 0, 0, 0.3), rgba(255, 200, 128, 0.05),rgba(255, 200, 128, 0.1), rgba(255,10,0,0.3));
|
||||||
|
--gradient-violet: linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6));
|
||||||
|
--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 0deg,
|
||||||
|
hsla(50, 100%, 80%, 0.7),
|
||||||
|
hsla(30, 30%, 40%, 0.1) 25%,
|
||||||
|
hsla(250, 50%, 40%, 0.1) 25%,
|
||||||
|
hsla(250, 30%, 30%, 0.7) 50%,
|
||||||
|
hsla(250, 50%, 40%, 0.1) 75%,
|
||||||
|
hsla(30, 30%, 40%, 0.1) 75%,
|
||||||
|
hsla(50, 100%, 80%, 0.7)
|
||||||
|
);
|
||||||
|
|
||||||
|
--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%);
|
||||||
|
--background-control-selected: linear-gradient(to bottom, hsla(0, 100%, 25%, 0.5) 5%, hsla(0, 100%, 12%, 0.5) 100%);
|
||||||
|
--background-tooltip: hsla(60, 12%, 85%, 0.95);
|
||||||
|
--color-tooltip:hsla(282, 47%, 33%, 0.9);
|
||||||
|
--color-tooltip-faint:hsla(282, 47%, 66%, 0.5);
|
||||||
|
--background-error:hsla(16, 100%, 50%, 0.8);
|
||||||
|
--color-profile-border: hsla(0, 0%, 80%, 0.05);
|
||||||
|
}
|
||||||
|
|
30
less/fonts.less
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* ==================== (A) Fonts ==================== */
|
||||||
|
@font-face {
|
||||||
|
font-family: "GoudyAcc";
|
||||||
|
src: url('../fonts/goudyacc.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "MedievalSharp";
|
||||||
|
src: url('../fonts/MedievalSharp.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "GrenzeGotisch";
|
||||||
|
src: url('../fonts/GrenzeGotisch-Regular.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "Fondamento";
|
||||||
|
src: url('../fonts/Fondamento.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: "CaslonAntique";
|
||||||
|
src: url('../fonts/CaslonAntique.ttf') format("truetype");
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'HeuresDraconiques';
|
||||||
|
src:
|
||||||
|
url('../fonts/heuresdraconiques2.woff') format('woff'),
|
||||||
|
url('../fonts/heuresdraconiques2.woff2') format('woff2'),
|
||||||
|
url('../fonts/heuresdraconiques2.ttf') format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
@ -1,105 +1,10 @@
|
|||||||
/* ==================== (A) Fonts ==================== */
|
@import "fonts.less";
|
||||||
@font-face {
|
@import "colors.less";
|
||||||
font-family: "GoudyAcc";
|
|
||||||
src: url('../fonts/goudyacc.ttf') format("truetype");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "MedievalSharp";
|
|
||||||
src: url('../fonts/MedievalSharp.ttf') format("truetype");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "GrenzeGotisch";
|
|
||||||
src: url('../fonts/GrenzeGotisch-Regular.ttf') format("truetype");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "Fondamento";
|
|
||||||
src: url('../fonts/Fondamento.ttf') format("truetype");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "CaslonAntique";
|
|
||||||
src: url('../fonts/CaslonAntique.ttf') format("truetype");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: 'HeuresDraconiques';
|
|
||||||
src:
|
|
||||||
url('../fonts/heuresdraconiques2.woff') format('woff'),
|
|
||||||
url('../fonts/heuresdraconiques2.woff2') format('woff2'),
|
|
||||||
url('../fonts/heuresdraconiques2.ttf') format('truetype');
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
:root {
|
|
||||||
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
|
|
||||||
--window-header-title-font-family: CaslonAntique;
|
|
||||||
--window-header-title-font-size: 1.6rem;
|
|
||||||
--window-header-title-font-weight: normal;
|
|
||||||
--window-header-title-color: #f5f5f5;
|
|
||||||
|
|
||||||
--major-button-font-family: CaslonAntique;
|
body {
|
||||||
--major-button-font-size: 1.4rem;
|
--input-height: 1.4rem;
|
||||||
--major-button-font-weight: normal;
|
|
||||||
--major-button-color: #dadada;
|
|
||||||
|
|
||||||
--tab-header-font-family: CaslonAntique;
|
|
||||||
--tab-header-font-size: 1.2rem;
|
|
||||||
--tab-header-font-weight: 700;
|
|
||||||
--tab-header-color: #403f3e;
|
|
||||||
--tab-header-color-active: #4a0404;
|
|
||||||
|
|
||||||
--actor-input-font-family: CaslonAntique;
|
|
||||||
--actor-input-font-size: 1.2rem;
|
|
||||||
--actor-input-font-weight: 500;
|
|
||||||
--actor-input-color: black;
|
|
||||||
|
|
||||||
--actor-label-font-family: CaslonAntique;
|
|
||||||
--actor-label-font-size: 1.2rem;
|
|
||||||
--actor-label-font-weight: 700;
|
|
||||||
--actor-label-color: #464331c4;
|
|
||||||
|
|
||||||
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
|
|
||||||
--debug-background-color-red: #ff000054;
|
|
||||||
--debug-background-color-blue: #1d00ff54;
|
|
||||||
--debug-background-color-green: #54ff0054;
|
|
||||||
|
|
||||||
--debug-box-shadow-red: inset 0 0 2px red;
|
|
||||||
--debug-box-shadow-blue: inset 0 0 2px blue;
|
|
||||||
--debug-box-shadow-green: inset 0 0 2px green;
|
|
||||||
|
|
||||||
/* =================== 3. some constants ============ */
|
|
||||||
--color-controls:rgba(0, 0, 0, 0.9);
|
|
||||||
--color-controls-light:hsla(0, 0%, 20%, 0.8);
|
|
||||||
--color-controls-hover:hsla(60, 100%, 75%, 0.7);
|
|
||||||
--color-control-border-hover:rgba(255, 128, 0, 0.8);
|
|
||||||
--color-gold: rgba(191, 149, 63, 0.8);
|
|
||||||
--gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3));
|
|
||||||
--gradient-silver: linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3));
|
|
||||||
--gradient-green: linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3));
|
|
||||||
--gradient-red: linear-gradient(150deg, rgba(255, 0, 0, 0.3), rgba(255, 200, 128, 0.05),rgba(255, 200, 128, 0.1), rgba(255,10,0,0.3));
|
|
||||||
--gradient-violet: linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6));
|
|
||||||
--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 0deg,
|
|
||||||
hsla(50, 100%, 80%, 0.7),
|
|
||||||
hsla(30, 30%, 40%, 0.1) 25%,
|
|
||||||
hsla(250, 50%, 40%, 0.1) 25%,
|
|
||||||
hsla(250, 30%, 30%, 0.7) 50%,
|
|
||||||
hsla(250, 50%, 40%, 0.1) 75%,
|
|
||||||
hsla(30, 30%, 40%, 0.1) 75%,
|
|
||||||
hsla(50, 100%, 80%, 0.7)
|
|
||||||
);
|
|
||||||
|
|
||||||
--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%);
|
|
||||||
--background-control-selected: linear-gradient(to bottom, hsla(0, 100%, 25%, 0.5) 5%, hsla(0, 100%, 12%, 0.5) 100%);
|
|
||||||
--background-tooltip: hsla(60, 12%, 85%, 0.95);
|
|
||||||
--color-tooltip:hsla(282, 47%, 33%, 0.9);
|
|
||||||
--color-tooltip-faint:hsla(282, 47%, 66%, 0.5);
|
|
||||||
--background-error:hsla(16, 100%, 50%, 0.8);
|
|
||||||
--color-profile-border: hsla(0, 0%, 80%, 0.05);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/
|
|
||||||
/* Global styles & Font */
|
/* Global styles & Font */
|
||||||
.window-app {
|
.window-app {
|
||||||
font-family: CaslonAntique;
|
font-family: CaslonAntique;
|
||||||
@ -221,7 +126,7 @@ i:is(.fas, .far, .fa-solid, .fa-regular, .fa-sharp ) {
|
|||||||
max-width: 1.4rem;
|
max-width: 1.4rem;
|
||||||
max-height: 1.4rem;
|
max-height: 1.4rem;
|
||||||
border: 1px;
|
border: 1px;
|
||||||
background: center / contain no-repeat url('img/ui/icone_parchement_vierge.webp');
|
background: center / contain no-repeat url('../../assets/ui/icone_parchement_vierge.webp');
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-foundryvtt-reve-de-dragon .sheet-header .header-compteurs {
|
.system-foundryvtt-reve-de-dragon .sheet-header .header-compteurs {
|
||||||
@ -255,7 +160,7 @@ i:is(.fas, .far, .fa-solid, .fa-regular, .fa-sharp ) {
|
|||||||
border-top: 0 none;
|
border-top: 0 none;
|
||||||
border-bottom: 0 none;
|
border-bottom: 0 none;
|
||||||
color: rgba(52, 52, 52, 0.95);
|
color: rgba(52, 52, 52, 0.95);
|
||||||
background: rgb(245,245,240) url(img/bg_menu.webp) no-repeat left top;
|
background: rgb(245,245,240) url(../assets/ui/bg_menu.webp) no-repeat left top;
|
||||||
}
|
}
|
||||||
.sheet nav.sheet-tabs .item ,
|
.sheet nav.sheet-tabs .item ,
|
||||||
nav.sheet-tabs .item {
|
nav.sheet-tabs .item {
|
||||||
@ -731,10 +636,36 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
|
|||||||
.flex-grow-3 {
|
.flex-grow-3 {
|
||||||
flex-grow: 3;
|
flex-grow: 3;
|
||||||
}
|
}
|
||||||
|
fieldset {
|
||||||
.editor.prosemirror {
|
border-style: groove;
|
||||||
|
border-width: 0.1rem;
|
||||||
|
padding-inline: 0.2rem;
|
||||||
|
padding-block: 0.1rem;
|
||||||
|
margin-inline: 0.1rem;
|
||||||
|
margin-block: 0.1rem;
|
||||||
|
}
|
||||||
|
form.application.sheet.fvtt-rdd fieldset :is(label, input) {
|
||||||
|
font-family: CaslonAntique;
|
||||||
|
text-align: justify;
|
||||||
|
font-size: 1rem;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
form.application.sheet.fvtt-rdd div.form-group {
|
||||||
|
clear: both;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin: 0.1rem 0;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
form.application.sheet.fvtt-rdd .editor.prosemirror {
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
min-height: 20rem;
|
min-height: 5rem;
|
||||||
|
}
|
||||||
|
form.application.sheet.fvtt-rdd prose-mirror.prosemirror .editor-container {
|
||||||
|
min-height: 5rem;
|
||||||
|
height: fit-content;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
.large-editor {
|
.large-editor {
|
||||||
border: 2;
|
border: 2;
|
||||||
@ -742,6 +673,7 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
|
|||||||
min-height: 12rem;
|
min-height: 12rem;
|
||||||
padding: 0 3px;
|
padding: 0 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor {
|
.editor {
|
||||||
border: 2;
|
border: 2;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
@ -765,6 +697,7 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
|
|||||||
.foundryvtt-reve-de-dragon.sheet :is(.large-editor,.editor,.medium-editor,.small-editor){
|
.foundryvtt-reve-de-dragon.sheet :is(.large-editor,.editor,.medium-editor,.small-editor){
|
||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.foundryvtt-reve-de-dragon.sheet :is(.large-editor,.editor,.medium-editor,.small-editor) .editor.prosemirror{
|
.foundryvtt-reve-de-dragon.sheet :is(.large-editor,.editor,.medium-editor,.small-editor) .editor.prosemirror{
|
||||||
align-items: normal;
|
align-items: normal;
|
||||||
}
|
}
|
||||||
@ -926,7 +859,7 @@ div.placeholder-resolution span.table-proba-reussite{
|
|||||||
/* ======================================== */
|
/* ======================================== */
|
||||||
/* Sheet */
|
/* Sheet */
|
||||||
.window-app.sheet .window-content .sheet-header{
|
.window-app.sheet .window-content .sheet-header{
|
||||||
background: #011d33 url(img/bg_header.webp) no-repeat left top;
|
background: #011d33 url(../assets/ui/bg_header.webp) no-repeat left top;
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1012,7 +945,7 @@ form.rdddialogchrono input[type=datetime-local] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
|
.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;
|
background: rgb(245,245,240) url(../assets/ui/bg_left.webp) no-repeat left top;
|
||||||
}
|
}
|
||||||
|
|
||||||
section.sheet-body {
|
section.sheet-body {
|
||||||
@ -1157,7 +1090,7 @@ ul, li {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
:is(.sheet, div.fenetre-recherche div.section-filters-text) input.recherche {
|
:is(.sheet, div.fenetre-recherche div.section-filters-text) input.recherche {
|
||||||
background-image: url("img/ui/icon-search.svg");
|
background-image: url("../assets/ui/icon-search.svg");
|
||||||
background-position: 0.1rem 0.1rem;
|
background-position: 0.1rem 0.1rem;
|
||||||
background-size: 1rem;
|
background-size: 1rem;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
@ -1176,27 +1109,13 @@ span.embed-inline {
|
|||||||
background: rgba(80, 60, 0, 0.10);
|
background: rgba(80, 60, 0, 0.10);
|
||||||
}
|
}
|
||||||
.alterne-list > .list-item:nth-child(odd) {
|
.alterne-list > .list-item:nth-child(odd) {
|
||||||
background: rgb(160, 130, 100, 0.05);
|
background: rgba(160, 130, 100, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
input.attribute-value.field-error ,
|
.attribute-value.field-error,
|
||||||
.list-item span.field-error {
|
.list-item .field-error {
|
||||||
background-color: var(--background-error);
|
background-color: var(--background-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.chat-list {
|
|
||||||
margin-left: 0.8rem;
|
|
||||||
list-style: inside;
|
|
||||||
}
|
|
||||||
ul.chat-list li:nth-child(even) {
|
|
||||||
background: rgba(80, 60, 0, 0.10);
|
|
||||||
list-style-type: disc;
|
|
||||||
}
|
|
||||||
ul.chat-list li:nth-child(odd) {
|
|
||||||
background: rgb(160, 130, 100, 0.05);
|
|
||||||
list-style-type: disc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.xp-level-up {
|
.xp-level-up {
|
||||||
margin: 0.1rem;
|
margin: 0.1rem;
|
||||||
box-shadow: inset 0px 0px 1px #00000096;
|
box-shadow: inset 0px 0px 1px #00000096;
|
||||||
@ -1237,23 +1156,11 @@ ul.chat-list li:nth-child(odd) {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-row {
|
.table-row {
|
||||||
margin: 0.1rem;
|
margin: 0.1rem;
|
||||||
padding: 0.1rem;
|
padding: 0.1rem;
|
||||||
flex: 1 1 5rem;
|
flex: 1 1 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alterne-row > .row-item:hover {
|
|
||||||
background: rgba(100, 100, 50, 0.25);
|
|
||||||
}
|
|
||||||
.alterne-row > .row-item:nth-child(even) {
|
|
||||||
background: rgba(80, 60, 0, 0.10);
|
|
||||||
}
|
|
||||||
.alterne-row > .row-item:nth-child(odd) {
|
|
||||||
background: rgb(160, 130, 100, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-display-show {
|
.item-display-show {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
@ -1261,7 +1168,7 @@ ul.chat-list li:nth-child(odd) {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.conteneur-type {
|
.conteneur-type {
|
||||||
background: rgb(200, 10, 100, 0.25);
|
background: rgba(200, 10, 100, 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-column {
|
.item-column {
|
||||||
@ -1542,7 +1449,7 @@ div.control-icon.token-hud-icon {
|
|||||||
/* Sidebar CSS */
|
/* Sidebar CSS */
|
||||||
#sidebar {
|
#sidebar {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
background: rgb(105,85,65) url(img/bg_sid_dark.webp) no-repeat right bottom;
|
background: rgb(105,85,65) url(../assets/ui/bg_sid_dark.webp) no-repeat right bottom;
|
||||||
background-position: 100%;
|
background-position: 100%;
|
||||||
color: rgba(220,220,220,0.75);
|
color: rgba(220,220,220,0.75);
|
||||||
}
|
}
|
||||||
@ -1622,18 +1529,18 @@ div.control-icon.token-hud-icon {
|
|||||||
.fa-book-open, .fa-th-list, .fa-music,
|
.fa-book-open, .fa-th-list, .fa-music,
|
||||||
.fa-atlas,.fa-cogs
|
.fa-atlas,.fa-cogs
|
||||||
):before {content: "";}
|
):before {content: "";}
|
||||||
#sidebar #sidebar-tabs i.fa-comments {background: url("img/ui/icon_sidebar_chat.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-comments {background: url("../assets/ui/icon_sidebar_chat.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-fist-raised {background: url("img/ui/icon_sidebar_fight.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-fist-raised {background: url("../assets/ui/icon_sidebar_fight.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-swords {background: url("img/ui/icon_sidebar_fight.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-swords {background: url("../assets/ui/icon_sidebar_fight.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-user {background: url("img/ui/icon_sidebar_actor.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-user {background: url("../assets/ui/icon_sidebar_actor.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-users {background: url("img/ui/icon_sidebar_actor.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-users {background: url("../assets/ui/icon_sidebar_actor.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-map {background: url("img/ui/icon_sidebar_scene.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-map {background: url("../assets/ui/icon_sidebar_scene.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-suitcase {background: url("img/ui/icon_sidebar_item.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-suitcase {background: url("../assets/ui/icon_sidebar_item.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-book-open {background: url("img/ui/icon_sidebar_journal.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-book-open {background: url("../assets/ui/icon_sidebar_journal.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-th-list {background: url("img/ui/icon_sidebar_rolltable.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-th-list {background: url("../assets/ui/icon_sidebar_rolltable.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-music {background: url("img/ui/icon_sidebar_music.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-music {background: url("../assets/ui/icon_sidebar_music.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-atlas {background: url("img/ui/icon_sidebar_compendium.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-atlas {background: url("../assets/ui/icon_sidebar_compendium.svg") no-repeat;}
|
||||||
#sidebar #sidebar-tabs i.fa-cogs {background: url("img/ui/icon_sidebar_settings.svg") no-repeat;}
|
#sidebar #sidebar-tabs i.fa-cogs {background: url("../assets/ui/icon_sidebar_settings.svg") no-repeat;}
|
||||||
|
|
||||||
#combat #combat-controls {
|
#combat #combat-controls {
|
||||||
box-shadow: inset 0 0 2rem rgba(0,0,0,0.5);
|
box-shadow: inset 0 0 2rem rgba(0,0,0,0.5);
|
||||||
@ -1648,7 +1555,7 @@ div.control-icon.token-hud-icon {
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background: rgba(30, 25, 20, 1);
|
background: rgba(30, 25, 20, 1);
|
||||||
background-origin: padding-box;
|
background-origin: padding-box;
|
||||||
border-image: url(img/ui/footer-button.webp) 10 repeat;
|
border-image: url(../assets/ui/footer-button.webp) 10 repeat;
|
||||||
border-image-width: 4px;
|
border-image-width: 4px;
|
||||||
border-image-outset: 0px;
|
border-image-outset: 0px;
|
||||||
}
|
}
|
||||||
@ -1659,7 +1566,7 @@ div.control-icon.token-hud-icon {
|
|||||||
#controls :is(.scene-control.active,.control-tool.active, .scene-control:hover, .control-tool:hover) {
|
#controls :is(.scene-control.active,.control-tool.active, .scene-control:hover, .control-tool:hover) {
|
||||||
background: rgba(72, 46, 28, 1);
|
background: rgba(72, 46, 28, 1);
|
||||||
background-origin: padding-box;
|
background-origin: padding-box;
|
||||||
border-image: url(img/ui/footer-button.webp) 10 repeat;
|
border-image: url(../assets/ui/footer-button.webp) 10 repeat;
|
||||||
border-image-width: 4px;
|
border-image-width: 4px;
|
||||||
border-image-outset: 0px;
|
border-image-outset: 0px;
|
||||||
box-shadow: 0 0 3px #ff6400;
|
box-shadow: 0 0 3px #ff6400;
|
||||||
@ -1671,7 +1578,7 @@ div.control-icon.token-hud-icon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#hotbar #action-bar .macro {
|
#hotbar #action-bar .macro {
|
||||||
border-image: url(img/ui/bg_control.webp) 21 repeat;
|
border-image: url(../assets/ui/bg_control.webp) 21 repeat;
|
||||||
border-image-slice: 6 6 6 6 fill;
|
border-image-slice: 6 6 6 6 fill;
|
||||||
border-image-width: 6px 6px 6px 6px;
|
border-image-width: 6px 6px 6px 6px;
|
||||||
border-image-outset: 0px 0px 0px 0px;
|
border-image-outset: 0px 0px 0px 0px;
|
||||||
@ -1684,7 +1591,7 @@ div.control-icon.token-hud-icon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#players {
|
#players {
|
||||||
border-image: url(img/ui/footer-button.webp) 10 repeat;
|
border-image: url(../assets/ui/footer-button.webp) 10 repeat;
|
||||||
border-image-width: 4px;
|
border-image-width: 4px;
|
||||||
border-image-outset: 0px;
|
border-image-outset: 0px;
|
||||||
background: rgba(30, 25, 20, 1);
|
background: rgba(30, 25, 20, 1);
|
||||||
@ -1697,7 +1604,7 @@ div.control-icon.token-hud-icon {
|
|||||||
#navigation #scene-list .scene.nav-item {
|
#navigation #scene-list .scene.nav-item {
|
||||||
background: rgba(30, 25, 20, 1);
|
background: rgba(30, 25, 20, 1);
|
||||||
background-origin: padding-box;
|
background-origin: padding-box;
|
||||||
border-image: url(img/ui/footer-button.webp) 10 repeat;
|
border-image: url(../assets/ui/footer-button.webp) 10 repeat;
|
||||||
border-image-width: 4px;
|
border-image-width: 4px;
|
||||||
border-image-outset: 0px;
|
border-image-outset: 0px;
|
||||||
}
|
}
|
||||||
@ -1705,7 +1612,7 @@ div.control-icon.token-hud-icon {
|
|||||||
#navigation #scene-list .scene.view, #navigation #scene-list .scene.context {
|
#navigation #scene-list .scene.view, #navigation #scene-list .scene.context {
|
||||||
background: rgba(72, 46, 28, 1);
|
background: rgba(72, 46, 28, 1);
|
||||||
background-origin: padding-box;
|
background-origin: padding-box;
|
||||||
border-image: url(img/ui/footer-button.webp) 10 repeat;
|
border-image: url(../assets/ui/footer-button.webp) 10 repeat;
|
||||||
border-image-width: 4px;
|
border-image-width: 4px;
|
||||||
border-image-outset: 0px;
|
border-image-outset: 0px;
|
||||||
box-shadow: 0 0 3px #ff6400;
|
box-shadow: 0 0 3px #ff6400;
|
||||||
@ -1714,7 +1621,7 @@ div.control-icon.token-hud-icon {
|
|||||||
#navigation #nav-toggle {
|
#navigation #nav-toggle {
|
||||||
background: rgba(30, 25, 20, 1);
|
background: rgba(30, 25, 20, 1);
|
||||||
background-origin: padding-box;
|
background-origin: padding-box;
|
||||||
border-image: url(img/ui/footer-button.webp) 10 repeat;
|
border-image: url(../assets/ui/footer-button.webp) 10 repeat;
|
||||||
border-image-width: 4px;
|
border-image-width: 4px;
|
||||||
border-image-outset: 0px;
|
border-image-outset: 0px;
|
||||||
}
|
}
|
||||||
@ -1783,7 +1690,7 @@ div.horloge-roue div {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.horloge-roue div.horloge-cercle {
|
div.horloge-roue div.horloge-cercle {
|
||||||
background: hsl(60, 20%, 95%) url(img/bg_left.webp) no-repeat left top;
|
background: hsl(60, 20%, 95%) url(../assets/ui/bg_left.webp) no-repeat left top;
|
||||||
top: 2%; left: 2%; width: 96%; height: 96%; border-radius: 50%;
|
top: 2%; left: 2%; width: 96%; height: 96%; border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1968,7 +1875,7 @@ div.calendar-timestamp-edit select.calendar-signe-heure {
|
|||||||
width: 360px;
|
width: 360px;
|
||||||
|
|
||||||
background: rgba(30, 25, 20, 0.9);
|
background: rgba(30, 25, 20, 0.9);
|
||||||
border-image: url(img/ui/bg_control.webp) 21 repeat;
|
border-image: url(../assets/ui/bg_control.webp) 21 repeat;
|
||||||
border-image-slice: 6 6 6 6 fill;
|
border-image-slice: 6 6 6 6 fill;
|
||||||
border-image-width: 6px 6px 6px 6px;
|
border-image-width: 6px 6px 6px 6px;
|
||||||
border-image-outset: 0px 0px 0px 0px;
|
border-image-outset: 0px 0px 0px 0px;
|
||||||
@ -2154,7 +2061,7 @@ aside#tooltip .toolclip p.faint {
|
|||||||
color: #CCC
|
color: #CCC
|
||||||
}
|
}
|
||||||
#pause > img {
|
#pause > img {
|
||||||
content: url(img/rdd_pause.webp);
|
content: url(../assets/ui/rdd_pause.webp);
|
||||||
height: 256px;
|
height: 256px;
|
||||||
width: 256px;
|
width: 256px;
|
||||||
top: -75px;
|
top: -75px;
|
||||||
@ -2162,7 +2069,7 @@ aside#tooltip .toolclip p.faint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
content : url(img/logo.webp);
|
content : url(../assets/ui/logo.webp);
|
||||||
width: 80px;
|
width: 80px;
|
||||||
height: 68px;
|
height: 68px;
|
||||||
}
|
}
|
@ -237,7 +237,11 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
|||||||
|
|
||||||
this.html.find('.carac-xp-augmenter').click(async event => await this.actor.updateCaracXPAuto(event.currentTarget.name.replace("augmenter.", "")))
|
this.html.find('.carac-xp-augmenter').click(async event => await this.actor.updateCaracXPAuto(event.currentTarget.name.replace("augmenter.", "")))
|
||||||
this.html.find('.competence-xp-augmenter').click(async event => await this.actor.updateCompetenceXPAuto(RdDSheetUtility.getItemId(event)))
|
this.html.find('.competence-xp-augmenter').click(async event => await this.actor.updateCompetenceXPAuto(RdDSheetUtility.getItemId(event)))
|
||||||
this.html.find('.competence-stress-augmenter').click(async event => await this.actor.updateCompetenceStress(RdDSheetUtility.getItemId(event)))
|
this.html.find('.competence-stress-augmenter').click(async event =>{
|
||||||
|
await this.actor.updateCompetenceStress(RdDSheetUtility.getItemId(event))
|
||||||
|
this.render(true)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if (this.options.vueDetaillee) {
|
if (this.options.vueDetaillee) {
|
||||||
// On carac change
|
// On carac change
|
||||||
|
@ -736,7 +736,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
await competence.update({
|
await competence.update({
|
||||||
"system.xp": toXp,
|
"system.xp": toXp,
|
||||||
"system.niveau": toNiveau,
|
"system.niveau": toNiveau,
|
||||||
});
|
}, { render: false })
|
||||||
await ExperienceLog.add(this, XP_TOPIC.XP, fromXp, toXp, competence.name);
|
await ExperienceLog.add(this, XP_TOPIC.XP, fromXp, toXp, competence.name);
|
||||||
await ExperienceLog.add(this, XP_TOPIC.NIVEAU, fromNiveau, toNiveau, competence.name);
|
await ExperienceLog.add(this, XP_TOPIC.NIVEAU, fromNiveau, toNiveau, competence.name);
|
||||||
}
|
}
|
||||||
@ -767,7 +767,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
await competence.update({
|
await competence.update({
|
||||||
"system.xp": newXp,
|
"system.xp": newXp,
|
||||||
"system.niveau": toNiveau,
|
"system.niveau": toNiveau,
|
||||||
});
|
}, { render: false })
|
||||||
const toXpStress = Math.max(0, fromXpStress - xpUtilise);
|
const toXpStress = Math.max(0, fromXpStress - xpUtilise);
|
||||||
await this.update({ "system.compteurs.experience.value": toXpStress });
|
await this.update({ "system.compteurs.experience.value": toXpStress });
|
||||||
|
|
||||||
@ -783,7 +783,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
const toNiveau = compValue ?? RdDItemCompetence.getNiveauBase(competence.system.categorie, competence.getCategories());
|
const toNiveau = compValue ?? RdDItemCompetence.getNiveauBase(competence.system.categorie, competence.getCategories());
|
||||||
this.notifyCompetencesTronc(competence, toNiveau);
|
this.notifyCompetencesTronc(competence, toNiveau);
|
||||||
const fromNiveau = competence.system.niveau;
|
const fromNiveau = competence.system.niveau;
|
||||||
await competence.update({ 'system.niveau': toNiveau });
|
await competence.update({ 'system.niveau': toNiveau }, { render: false })
|
||||||
await ExperienceLog.add(this, XP_TOPIC.NIVEAU, fromNiveau, toNiveau, competence.name, true);
|
await ExperienceLog.add(this, XP_TOPIC.NIVEAU, fromNiveau, toNiveau, competence.name, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -808,7 +808,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
if (isNaN(toXp) || typeof (toXp) != 'number') toXp = 0;
|
if (isNaN(toXp) || typeof (toXp) != 'number') toXp = 0;
|
||||||
const fromXp = competence.system.xp;
|
const fromXp = competence.system.xp;
|
||||||
this.checkCompetenceXP(idOrName, toXp);
|
this.checkCompetenceXP(idOrName, toXp);
|
||||||
await competence.update({ 'system.xp': toXp });
|
await competence.update({ 'system.xp': toXp }, { render: false })
|
||||||
await ExperienceLog.add(this, XP_TOPIC.XP, fromXp, toXp, competence.name, true);
|
await ExperienceLog.add(this, XP_TOPIC.XP, fromXp, toXp, competence.name, true);
|
||||||
if (toXp > fromXp) {
|
if (toXp > fromXp) {
|
||||||
RdDUtility.checkThanatosXP(competence)
|
RdDUtility.checkThanatosXP(competence)
|
||||||
@ -822,7 +822,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
if (competence) {
|
if (competence) {
|
||||||
if (isNaN(toXpSort) || typeof (toXpSort) != 'number') toXpSort = 0;
|
if (isNaN(toXpSort) || typeof (toXpSort) != 'number') toXpSort = 0;
|
||||||
const fromXpSort = competence.system.xp_sort;
|
const fromXpSort = competence.system.xp_sort;
|
||||||
await competence.update({ 'system.xp_sort': toXpSort });
|
await competence.update({ 'system.xp_sort': toXpSort }, { render: false })
|
||||||
await ExperienceLog.add(this, XP_TOPIC.XPSORT, fromXpSort, toXpSort, competence.name, true);
|
await ExperienceLog.add(this, XP_TOPIC.XPSORT, fromXpSort, toXpSort, competence.name, true);
|
||||||
if (toXpSort > fromXpSort) {
|
if (toXpSort > fromXpSort) {
|
||||||
RdDUtility.checkThanatosXP(competence)
|
RdDUtility.checkThanatosXP(competence)
|
||||||
@ -834,7 +834,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
async updateCompetenceArchetype(idOrName, compValue) {
|
async updateCompetenceArchetype(idOrName, compValue) {
|
||||||
let competence = this.getCompetence(idOrName)
|
let competence = this.getCompetence(idOrName)
|
||||||
if (competence) {
|
if (competence) {
|
||||||
await competence.update({ 'system.niveau_archetype': Math.max(compValue ?? 0, 0) });
|
await competence.update({ 'system.niveau_archetype': Math.max(compValue ?? 0, 0) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1584,7 +1584,7 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _appliquerAppelMoral(rollData) {
|
async _appliquerAppelMoral(rollData) {
|
||||||
if (!rollData.use.moral || game.settings.get("core", "rollMode") == 'selfroll'){
|
if (!rollData.use.moral || game.settings.get("core", "rollMode") == 'selfroll') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (rollData.rolled.isEchec ||
|
if (rollData.rolled.isEchec ||
|
||||||
@ -2527,7 +2527,6 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const blessure = this.getItem(blessureId, 'blessure')
|
const blessure = this.getItem(blessureId, 'blessure')
|
||||||
console.log('TODO update blessure', this, blessureId, rollData, rollData.tache);
|
|
||||||
if (blessure && !blessure.system.premierssoins.done) {
|
if (blessure && !blessure.system.premierssoins.done) {
|
||||||
const tache = rollData.tache;
|
const tache = rollData.tache;
|
||||||
if (rollData.rolled.isETotal) {
|
if (rollData.rolled.isETotal) {
|
||||||
|
@ -244,16 +244,19 @@ export class RdDBaseActor extends Actor {
|
|||||||
async onUpdateActor(update, options, actorId) { }
|
async onUpdateActor(update, options, actorId) { }
|
||||||
async onDeleteItem(item, options, id) {
|
async onDeleteItem(item, options, id) {
|
||||||
if (item.isInventaire()) {
|
if (item.isInventaire()) {
|
||||||
this._removeItemFromConteneur(item)
|
await this._removeItemFromConteneur(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeItemFromConteneur(item) {
|
async _removeItemFromConteneur(item) {
|
||||||
this.items.filter(it => it.isConteneur() && it.system.contenu.includes(item.id))
|
const updates = this.items.filter(it => it.isConteneur() && it.system.contenu.includes(item.id))
|
||||||
.forEach(conteneur => {
|
.map(conteneur => {
|
||||||
const nouveauContenu = conteneur.system.contenu.filter(id => id != item.id);
|
const nouveauContenu = conteneur.system.contenu.filter(id => id != item.id)
|
||||||
conteneur.update({ 'system.contenu': nouveauContenu });
|
return { _id: conteneur.id, 'system.contenu': nouveauContenu }
|
||||||
});
|
})
|
||||||
|
if (updates.length > 0) {
|
||||||
|
await this.updateEmbeddedDocuments('Item', updates)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async onTimeChanging(oldTimestamp, newTimestamp) {
|
async onTimeChanging(oldTimestamp, newTimestamp) {
|
||||||
|
@ -3,7 +3,7 @@ import { Misc } from "../../misc.js"
|
|||||||
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js"
|
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js"
|
||||||
import { Mapping } from "./mapping.js"
|
import { Mapping } from "./mapping.js"
|
||||||
|
|
||||||
const IMG_SCRIPTARIUM = '<img class="context-menu-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/scriptarium.svg">'
|
const IMG_SCRIPTARIUM = '<img class="context-menu-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/scriptarium.svg">'
|
||||||
|
|
||||||
export class ExportScriptarium {
|
export class ExportScriptarium {
|
||||||
|
|
||||||
|
4
module/applications/sheets/_module.mjs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export { default as RdDItemBaseSheet} from "./common-item-sheet.mjs"
|
||||||
|
export { default as RdDMonnaieSheet } from "./monnaie-sheet.mjs"
|
||||||
|
export { default as RdDMunitionSheet } from "./munition-sheet.mjs"
|
||||||
|
|
111
module/applications/sheets/common-item-sheet.mjs
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
const { HandlebarsApplicationMixin } = foundry.applications.api
|
||||||
|
import { SYSTEM_RDD } from "../../constants.js"
|
||||||
|
import { Misc } from "../../misc.js"
|
||||||
|
import { RdDSheetUtility } from "../../rdd-sheet-utility.js";
|
||||||
|
|
||||||
|
|
||||||
|
export default class RdDItemBaseSheet extends HandlebarsApplicationMixin(foundry.applications.sheets.ItemSheetV2) {
|
||||||
|
|
||||||
|
static preloadHandlebars(...templatesList) {
|
||||||
|
const handlebars = ["systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/header.hbs"]
|
||||||
|
templatesList.forEach(templates =>
|
||||||
|
templates.forEach(t =>
|
||||||
|
t.handlebars().forEach(h => handlebars.push(h))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
loadTemplates(Misc.distinct(handlebars))
|
||||||
|
}
|
||||||
|
|
||||||
|
static register(sheetClass) {
|
||||||
|
const itemType = sheetClass.ITEM_TYPE
|
||||||
|
Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||||
|
label: Misc.typeName('Item', itemType),
|
||||||
|
types: [itemType],
|
||||||
|
makeDefault: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
static registerAll(...sheetClasses) {
|
||||||
|
const handlebars = ["systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/header.hbs"]
|
||||||
|
sheetClasses.forEach(sheetClass => {
|
||||||
|
sheetClass.TEMPLATES.forEach(t =>
|
||||||
|
t.handlebars().forEach(h => handlebars.push(h))
|
||||||
|
)
|
||||||
|
const itemType = sheetClass.ITEM_TYPE
|
||||||
|
Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||||
|
label: Misc.typeName('Item', itemType),
|
||||||
|
types: [itemType],
|
||||||
|
makeDefault: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
loadTemplates(Misc.distinct(handlebars))
|
||||||
|
}
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return undefined }
|
||||||
|
|
||||||
|
constructor(options = {}) {
|
||||||
|
super(options)
|
||||||
|
}
|
||||||
|
|
||||||
|
static get TEMPLATES() { return [] }
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = {
|
||||||
|
classes: ["fvtt-rdd", "item"],
|
||||||
|
position: {
|
||||||
|
width: 600,
|
||||||
|
height: "auto",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
submitOnChange: true,
|
||||||
|
},
|
||||||
|
window: {
|
||||||
|
resizable: true,
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
editImage: RdDItemBaseSheet.#onEditImage,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
return {
|
||||||
|
item: this.document,
|
||||||
|
options: RdDSheetUtility.getOptions(this.document, this.isEditable),
|
||||||
|
fields: this.document.schema.fields,
|
||||||
|
systemFields: this.document.system.schema.fields,
|
||||||
|
system: this.document.system,
|
||||||
|
source: this.document.toObject(),
|
||||||
|
isEditable: this.isEditable,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// #region Actions
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle changing a Document's image.
|
||||||
|
*
|
||||||
|
* @this RdDItemBaseSheet
|
||||||
|
* @param {PointerEvent} event The originating click event
|
||||||
|
* @param {HTMLElement} target The capturing HTML element which defined a [data-action]
|
||||||
|
* @returns {Promise}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
static async #onEditImage(event, target) {
|
||||||
|
const attr = target.dataset.edit
|
||||||
|
const current = foundry.utils.getProperty(this.document, attr)
|
||||||
|
const { img } = this.document.constructor.getDefaultArtwork?.(this.document.toObject()) ?? {}
|
||||||
|
const fp = new FilePicker({
|
||||||
|
current,
|
||||||
|
type: "image",
|
||||||
|
redirectToRoot: img ? [img] : [],
|
||||||
|
callback: (path) => {
|
||||||
|
this.document.update({ [attr]: path })
|
||||||
|
},
|
||||||
|
top: this.position.top + 40,
|
||||||
|
left: this.position.left + 10,
|
||||||
|
})
|
||||||
|
return fp.browse()
|
||||||
|
}
|
||||||
|
// #endregion
|
||||||
|
}
|
35
module/applications/sheets/monnaie-sheet.mjs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
|
||||||
|
import { ITEM_TYPES } from "../../constants.js";
|
||||||
|
import RdDItemBaseSheet from "./common-item-sheet.mjs";
|
||||||
|
|
||||||
|
export default class RdDMonnaieSheet extends RdDItemBaseSheet {
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static get ITEM_TYPE() { return ITEM_TYPES.monnaie }
|
||||||
|
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE] }
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = Object.assign({},
|
||||||
|
RdDItemBaseSheet.DEFAULT_OPTIONS,
|
||||||
|
{
|
||||||
|
classes: ["fvtt-rdd", "item", "monnaie"],
|
||||||
|
position: { width: 400 },
|
||||||
|
window: { contentClasses: ["monnaie-content"] }
|
||||||
|
})
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/monnaie.hbs",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
return Object.assign(
|
||||||
|
await super._prepareContext(),
|
||||||
|
await TEMPLATE_DESCRIPTION.prepareContext(this.document),
|
||||||
|
await TEMPLATE_INVENTAIRE.prepareContext(this.document)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
34
module/applications/sheets/munition-sheet.mjs
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
|
||||||
|
import { ITEM_TYPES } from "../../constants.js";
|
||||||
|
import RdDItemBaseSheet from "./common-item-sheet.mjs";
|
||||||
|
|
||||||
|
export default class RdDMunitionSheet extends RdDItemBaseSheet {
|
||||||
|
/** @override */
|
||||||
|
static get ITEM_TYPE() { return ITEM_TYPES.munition }
|
||||||
|
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE] }
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static DEFAULT_OPTIONS = Object.assign({},
|
||||||
|
RdDItemBaseSheet.DEFAULT_OPTIONS,
|
||||||
|
{
|
||||||
|
classes: ["fvtt-rdd", "item", "munition"],
|
||||||
|
position: { width: 400 },
|
||||||
|
window: { contentClasses: ["munition-content"] }
|
||||||
|
})
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static PARTS = {
|
||||||
|
main: {
|
||||||
|
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/munition.hbs",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
async _prepareContext() {
|
||||||
|
return Object.assign(
|
||||||
|
await super._prepareContext(),
|
||||||
|
await TEMPLATE_DESCRIPTION.prepareContext(this.document),
|
||||||
|
await TEMPLATE_INVENTAIRE.prepareContext(this.document)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -62,7 +62,6 @@ export class ChatUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
static removeMessages(socketData) {
|
static removeMessages(socketData) {
|
||||||
if (Misc.isFirstConnectedGM()) {
|
if (Misc.isFirstConnectedGM()) {
|
||||||
ChatUtility.onRemoveMessages(socketData);
|
ChatUtility.onRemoveMessages(socketData);
|
||||||
@ -97,7 +96,7 @@ export class ChatUtility {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "gmroll":
|
case "gmroll":
|
||||||
messageData.whisper = ChatUtility.getOwners(actor)
|
messageData.whisper = actor ? ChatUtility.getOwners(actor) : ChatUtility.getUserAndGMs()
|
||||||
break
|
break
|
||||||
case "selfroll":
|
case "selfroll":
|
||||||
messageData.whisper = [game.user]
|
messageData.whisper = [game.user]
|
||||||
@ -108,7 +107,7 @@ export class ChatUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static getOwners(document) {
|
static getOwners(document) {
|
||||||
return game.users.filter(it => document.getUserLevel(it) == CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER)
|
return document ? game.users.filter(it => document.getUserLevel(it) == CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER) : [game.user]
|
||||||
}
|
}
|
||||||
|
|
||||||
static getUserAndGMs() {
|
static getUserAndGMs() {
|
||||||
@ -199,7 +198,7 @@ export class ChatUtility {
|
|||||||
static async onCreateChatMessage(chatMessage, options, id) {
|
static async onCreateChatMessage(chatMessage, options, id) {
|
||||||
if (chatMessage.isAuthor) {
|
if (chatMessage.isAuthor) {
|
||||||
await chatMessage.setFlag(SYSTEM_RDD, 'rdd-timestamp', game.system.rdd.calendrier.getTimestamp());
|
await chatMessage.setFlag(SYSTEM_RDD, 'rdd-timestamp', game.system.rdd.calendrier.getTimestamp());
|
||||||
await chatMessage.update({ content: await RdDTextEditor.enrichHTML(chatMessage.content, undefined, {showLink:false}) })
|
await chatMessage.update({ content: await RdDTextEditor.enrichHTML(chatMessage.content, undefined, { showLink: false }) })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
8
module/common/_module.mjs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { CommonDescription } from "./description.mjs";
|
||||||
|
import { CommonInventaire } from "./inventaire.mjs";
|
||||||
|
|
||||||
|
export const TEMPLATE_DESCRIPTION = new CommonDescription()
|
||||||
|
export const TEMPLATE_INVENTAIRE = new CommonInventaire()
|
||||||
|
|
||||||
|
export const ALL_COMMON_TEMPLATES = [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE]
|
||||||
|
|
10
module/common/common-template.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* class describing common methods implemented by template parts,
|
||||||
|
* used for sheet/models/documents
|
||||||
|
*/
|
||||||
|
export default class CommonTemplate {
|
||||||
|
fields() { }
|
||||||
|
handlebars() { return [] }
|
||||||
|
actions() { return {} }
|
||||||
|
async prepareContext(item) { }
|
||||||
|
}
|
32
module/common/description.mjs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import { RdDTextEditor } from "../apps/rdd-text-roll-editor.js"
|
||||||
|
import CommonTemplate from "./common-template.mjs"
|
||||||
|
import { HTMLSTRING } from "./field-types.mjs"
|
||||||
|
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
|
||||||
|
export class CommonDescription extends CommonTemplate {
|
||||||
|
fields() {
|
||||||
|
return {
|
||||||
|
description: new fields.HTMLField({ ...HTMLSTRING }),
|
||||||
|
descriptionmj: new fields.HTMLField({ gmOnly: true, ...HTMLSTRING })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handlebars() {
|
||||||
|
return [
|
||||||
|
"systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/template-description.hbs",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
actions() {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
async prepareContext(item) {
|
||||||
|
const enriched = {
|
||||||
|
description: await RdDTextEditor.enrichHTML(item.system.description, item),
|
||||||
|
descriptionmj: await RdDTextEditor.enrichHTML(item.system.descriptionmj, item),
|
||||||
|
}
|
||||||
|
return { enriched }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
9
module/common/field-types.mjs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
export const INTEGER = { required: true, nullable: false, min: 0, integer: true }
|
||||||
|
export const DECIMAL = { required: true, nullable: false, min: 0, integer: false } /* TODO: validation de nombre décimales?*/
|
||||||
|
export const INTEGER_SIGNED = { required: true, nullable: false, integer: true }
|
||||||
|
export const DECIMAL_SIGNED = { required: true, nullable: false, integer: false }
|
||||||
|
export const STRING = { required: true, nullable: false, blank: true, trim: true }
|
||||||
|
export const HTMLSTRING = { initial: "", required: true, nullable: false, blank: true, textSearch: true }
|
||||||
|
|
||||||
|
export const MODEL_ARRAY = { initial: [], required: true, nullable: false }
|
||||||
|
|
36
module/common/inventaire.mjs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import CommonTemplate from "./common-template.mjs"
|
||||||
|
import { RARETES } from "../item/raretes.js"
|
||||||
|
import { DECIMAL, INTEGER, INTEGER_SIGNED, MODEL_ARRAY, STRING } from "./field-types.mjs"
|
||||||
|
|
||||||
|
const fields = foundry.data.fields
|
||||||
|
|
||||||
|
export class CommonInventaire extends CommonTemplate {
|
||||||
|
fields() {
|
||||||
|
return {
|
||||||
|
encombrement: new fields.NumberField({ label: "Encombrement", initial: 0, ...INTEGER }),
|
||||||
|
quantite: new fields.NumberField({ label: "Quantité", initial: 1, ...INTEGER }),
|
||||||
|
qualite: new fields.NumberField({ label: "Qualité", initial: 0, ...INTEGER_SIGNED }),
|
||||||
|
cout: new fields.NumberField({ label: "Coût", initial: 0.0, ...DECIMAL }),
|
||||||
|
environnement: new fields.ArrayField(
|
||||||
|
new fields.SchemaField({
|
||||||
|
milieu: new fields.StringField({ label: "Milieu", initial: "", ...STRING }),
|
||||||
|
rarete: new fields.StringField({
|
||||||
|
label: "Rareté", initial: RARETES[0].code, ...STRING,
|
||||||
|
validate: (value, options) => RARETES.find(it => it.code == value)
|
||||||
|
}),
|
||||||
|
frequence: new fields.NumberField({ label: "Fréquence", initial: RARETES[0].frequence, ...INTEGER }),
|
||||||
|
}),
|
||||||
|
{ label: "Environnement", ...MODEL_ARRAY }),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handlebars() {
|
||||||
|
return [
|
||||||
|
"systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/template-inventaire.hbs"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
async prepareContext(item) {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
2
module/documents/_module.mjs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export { default as RdDModelMonnaie } from "./monnaie.mjs"
|
||||||
|
export { default as RdDModelMunition } from "./munition.mjs"
|
7
module/documents/monnaie.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RdDItem } from "../item.js";
|
||||||
|
|
||||||
|
export default class RdDItemMonnaie extends RdDItem {
|
||||||
|
static get defaultIcon() {
|
||||||
|
return 'systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp'
|
||||||
|
}
|
||||||
|
}
|
7
module/documents/munition.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RdDItem } from "../item.js";
|
||||||
|
|
||||||
|
export default class RdDItemMunition extends RdDItem {
|
||||||
|
static get defaultIcon() {
|
||||||
|
return 'systems/foundryvtt-reve-de-dragon/icons/objets/fleche.webp'
|
||||||
|
}
|
||||||
|
}
|
@ -14,12 +14,11 @@ import { RdDItem } from "./item.js";
|
|||||||
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
||||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||||
import { ItemAction } from "./item/item-actions.js";
|
import { ItemAction } from "./item/item-actions.js";
|
||||||
import { RdDItemGemme } from "./item/gemme.js";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the basic ItemSheet for RdD specific items
|
* Extend the basic ItemSheet for RdD specific items
|
||||||
*/
|
*/
|
||||||
export class RdDItemSheet extends ItemSheet {
|
export class RdDItemSheetV1 extends ItemSheet {
|
||||||
|
|
||||||
static get ITEM_TYPE() {
|
static get ITEM_TYPE() {
|
||||||
return undefined
|
return undefined
|
||||||
@ -43,7 +42,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: [SYSTEM_RDD, "sheet", "item"],
|
classes: [SYSTEM_RDD, "sheet", "item"],
|
||||||
template: RdDItemSheet.defaultTemplate(RdDItemSheet.ITEM_TYPE),
|
template: RdDItemSheetV1.defaultTemplate(RdDItemSheetV1.ITEM_TYPE),
|
||||||
width: 550,
|
width: 550,
|
||||||
height: 550
|
height: 550
|
||||||
}, { inplace: false });
|
}, { inplace: false });
|
||||||
@ -51,7 +50,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
get template() {
|
get template() {
|
||||||
return RdDItemSheet.defaultTemplate(this.item.type);
|
return RdDItemSheetV1.defaultTemplate(this.item.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
@ -101,7 +100,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
|
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
|
||||||
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
||||||
isComestible: this.item.getUtilisationCuisine(),
|
isComestible: this.item.getUtilisationCuisine(),
|
||||||
options: RdDSheetUtility.mergeDocumentRights(this.options, this.item, this.isEditable),
|
options: RdDSheetUtility.mergeDocumentRights({}, this.item, this.isEditable),
|
||||||
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
|
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
|
||||||
categories: RdDItem.getCategories(this.item.type),
|
categories: RdDItem.getCategories(this.item.type),
|
||||||
}
|
}
|
||||||
@ -264,7 +263,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
_updateObject(event, formData) {
|
_updateObject(event, formData) {
|
||||||
switch (this.item.type) {
|
switch (this.item.type) {
|
||||||
case ITEM_TYPES.sort:
|
case ITEM_TYPES.sort:
|
||||||
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheet._listCaseTmr(
|
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheetV1._listCaseTmr(
|
||||||
formData.caseTmrCoord,
|
formData.caseTmrCoord,
|
||||||
formData.caseTmrBonus,
|
formData.caseTmrBonus,
|
||||||
formData.caseTmrAdd
|
formData.caseTmrAdd
|
||||||
@ -314,7 +313,7 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
|
|
||||||
async _onDrop(event) {
|
async _onDrop(event) {
|
||||||
// Try to extract the dragData
|
// Try to extract the dragData
|
||||||
let dragData = RdDItemSheet.$extractDragData(event);
|
let dragData = RdDItemSheetV1.$extractDragData(event);
|
||||||
if (!dragData) return false;
|
if (!dragData) return false;
|
||||||
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
|
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
|
||||||
if (allowed === false) return false;
|
if (allowed === false) return false;
|
||||||
|
@ -19,11 +19,13 @@ export class RdDItemRace extends RdDItem {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (code == LIST_CARAC_PERSONNAGE.taille.code) {
|
||||||
const carac = RdDCarac.carac(code)
|
const carac = RdDCarac.carac(code)
|
||||||
if (race.isMax(actor, code, value - 1)) {
|
if (race.isMax(actor, code, value - 1)) {
|
||||||
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
|
ui.notifications.warn(`${value} est supérieure au maximum de ${carac.label}`)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +61,8 @@ export class RdDItemRace extends RdDItem {
|
|||||||
if (code == LIST_CARAC_PERSONNAGE.force.code) {
|
if (code == LIST_CARAC_PERSONNAGE.force.code) {
|
||||||
return value >= this.getForceMax(actor)
|
return value >= this.getForceMax(actor)
|
||||||
}
|
}
|
||||||
const max = foundry.utils.getProperty(this, path) ?? -1
|
const pathMax = path.replace(".value", ".max");
|
||||||
|
const max = foundry.utils.getProperty(this, pathMax) ?? -1
|
||||||
return (max > 0 && value >= max)
|
return (max > 0 && value >= max)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { HtmlUtility } from "../html-utility.js";
|
import { HtmlUtility } from "../html-utility.js";
|
||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
import { Misc } from "../misc.js";
|
import { Misc } from "../misc.js";
|
||||||
import { RdDRaretes } from "./raretes.js";
|
import { RdDRaretes } from "./raretes.js";
|
||||||
|
|
||||||
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
||||||
|
|
||||||
export class RdDItemInventaireSheet extends RdDItemSheet {
|
export class RdDItemInventaireSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get defaultOptions() {
|
static get defaultOptions() {
|
||||||
return foundry.utils.mergeObject(RdDItemSheet.defaultOptions, {
|
return foundry.utils.mergeObject(RdDItemSheetV1.defaultOptions, {
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
||||||
}, { inplace: false })
|
}, { inplace: false })
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDBlessureItemSheet extends RdDItemSheet {
|
export class RdDBlessureItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "blessure" };
|
static get ITEM_TYPE() { return "blessure" };
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { RdDRencontre } from "./rencontre.js";
|
import { RdDRencontre } from "./rencontre.js";
|
||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDRencontreItemSheet extends RdDItemSheet {
|
export class RdDRencontreItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "rencontre" };
|
static get ITEM_TYPE() { return "rencontre" };
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDServiceItemSheet extends RdDItemSheet {
|
export class RdDServiceItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "service" };
|
static get ITEM_TYPE() { return "service" };
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { RdDItemSheet } from "../item-sheet.js";
|
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||||
import { RdDItemSigneDraconique } from "./signedraconique.js";
|
import { RdDItemSigneDraconique } from "./signedraconique.js";
|
||||||
import { TMRUtility } from "../tmr-utility.js";
|
import { TMRUtility } from "../tmr-utility.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item sheet pour signes draconiques
|
* Item sheet pour signes draconiques
|
||||||
* @extends {RdDItemSheet}
|
* @extends {RdDItemSheetV1}
|
||||||
*/
|
*/
|
||||||
export class RdDSigneDraconiqueItemSheet extends RdDItemSheet {
|
export class RdDSigneDraconiqueItemSheet extends RdDItemSheetV1 {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "signedraconique" }
|
static get ITEM_TYPE() { return "signedraconique" }
|
||||||
|
|
||||||
|
2
module/models/_module.mjs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export { default as RdDModelMonnaie } from "./monnaie.mjs"
|
||||||
|
export { default as RdDModelMunition } from "./munition.mjs"
|
10
module/models/monnaie.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../common/_module.mjs";
|
||||||
|
|
||||||
|
export default class RdDModelMonnaie extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
return Object.assign({},
|
||||||
|
TEMPLATE_DESCRIPTION.fields(),
|
||||||
|
TEMPLATE_INVENTAIRE.fields()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
10
module/models/munition.mjs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../common/_module.mjs";
|
||||||
|
|
||||||
|
export default class RdDModelMunition extends foundry.abstract.TypeDataModel {
|
||||||
|
static defineSchema() {
|
||||||
|
return Object.assign({},
|
||||||
|
TEMPLATE_DESCRIPTION.fields(),
|
||||||
|
TEMPLATE_INVENTAIRE.fields()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
@ -832,7 +832,10 @@ export class RdDCombat {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _onAttaqueNormale(attackerRoll) {
|
async _onAttaqueNormale(attackerRoll) {
|
||||||
if (!RdDCombat.isReussite(attackerRoll) || RdDCombat.isParticuliere(attackerRoll)) {
|
if (!RdDCombat.isReussite(attackerRoll)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (RdDCombat.isParticuliere(attackerRoll) && attackerRoll.particuliere == undefined) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||||
@ -849,7 +852,7 @@ export class RdDCombat {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.target) {
|
if (this.defender) {
|
||||||
await this._sendMessageDefense(attackerRoll, defenderRoll);
|
await this._sendMessageDefense(attackerRoll, defenderRoll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -999,7 +1002,7 @@ export class RdDCombat {
|
|||||||
|
|
||||||
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
this.removeChatMessageActionsPasseArme(rollData.passeArme);
|
||||||
rollData.particuliere = choix;
|
rollData.particuliere = choix;
|
||||||
await this._onAttaqueNormale(rollData);
|
await this._onAttaqueNormale(rollData)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -54,7 +54,7 @@ import { RdDItemSouffle } from "./item/souffle.js"
|
|||||||
|
|
||||||
import { RdDRencontre } from "./item/rencontre.js"
|
import { RdDRencontre } from "./item/rencontre.js"
|
||||||
|
|
||||||
import { RdDItemSheet } from "./item-sheet.js"
|
import { RdDItemSheetV1 } from "./item-sheet.js"
|
||||||
import { RdDBlessureItemSheet } from "./item/sheet-blessure.js"
|
import { RdDBlessureItemSheet } from "./item/sheet-blessure.js"
|
||||||
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
import { RdDServiceItemSheet } from "./item/sheet-service.js"
|
||||||
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
|
||||||
@ -80,6 +80,10 @@ import { RdDItemPotion } from "./item/potion.js"
|
|||||||
import { RdDItemGemme } from "./item/gemme.js"
|
import { RdDItemGemme } from "./item/gemme.js"
|
||||||
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
|
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
|
||||||
|
|
||||||
|
import * as models from "./models/_module.mjs"
|
||||||
|
import * as items from "./documents/_module.mjs"
|
||||||
|
import * as sheets from "./applications/sheets/_module.mjs"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RdD system
|
* RdD system
|
||||||
* Author: LeRatierBretonnien
|
* Author: LeRatierBretonnien
|
||||||
@ -100,6 +104,8 @@ export class SystemReveDeDragon {
|
|||||||
this.RdDHotbar = RdDHotbar
|
this.RdDHotbar = RdDHotbar
|
||||||
this.RdDStatBlockParser = RdDStatBlockParser
|
this.RdDStatBlockParser = RdDStatBlockParser
|
||||||
this.itemClasses = {
|
this.itemClasses = {
|
||||||
|
monnaie: items.RdDModelMonnaie,
|
||||||
|
munition: items.RdDModelMunition,
|
||||||
armure: RdDItemArmure,
|
armure: RdDItemArmure,
|
||||||
blessure: RdDItemBlessure,
|
blessure: RdDItemBlessure,
|
||||||
gemme: RdDItemGemme,
|
gemme: RdDItemGemme,
|
||||||
@ -129,6 +135,9 @@ export class SystemReveDeDragon {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
onInit() {
|
onInit() {
|
||||||
game.system.rdd = this
|
game.system.rdd = this
|
||||||
|
|
||||||
|
globalThis.RdD = game.system
|
||||||
|
|
||||||
this.AppAstrologie = AppAstrologie
|
this.AppAstrologie = AppAstrologie
|
||||||
|
|
||||||
console.log(`Initializing Reve de Dragon System Settings`)
|
console.log(`Initializing Reve de Dragon System Settings`)
|
||||||
@ -175,6 +184,10 @@ export class SystemReveDeDragon {
|
|||||||
console.log(`Initializing Reve de Dragon Documents`)
|
console.log(`Initializing Reve de Dragon Documents`)
|
||||||
CONFIG.Actor.documentClass = RdDBaseActor
|
CONFIG.Actor.documentClass = RdDBaseActor
|
||||||
CONFIG.Item.documentClass = RdDItem
|
CONFIG.Item.documentClass = RdDItem
|
||||||
|
CONFIG.Item.dataModels = {
|
||||||
|
monnaie: models.RdDModelMonnaie,
|
||||||
|
munition: models.RdDModelMunition,
|
||||||
|
}
|
||||||
CONFIG.RDD = {
|
CONFIG.RDD = {
|
||||||
resolutionTable: RdDResolutionTable.resolutionTable,
|
resolutionTable: RdDResolutionTable.resolutionTable,
|
||||||
carac_array: RdDUtility.getCaracArray(),
|
carac_array: RdDUtility.getCaracArray(),
|
||||||
@ -195,12 +208,17 @@ export class SystemReveDeDragon {
|
|||||||
|
|
||||||
Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
|
Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
|
||||||
types: [
|
types: [
|
||||||
"objet", "arme", "armure", "livre", "munition",
|
"objet", "arme", "armure", "livre", "nourritureboisson",
|
||||||
"monnaie", "nourritureboisson",
|
|
||||||
],
|
],
|
||||||
makeDefault: true
|
makeDefault: true
|
||||||
})
|
})
|
||||||
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
|
|
||||||
|
sheets.RdDItemBaseSheet.registerAll(
|
||||||
|
sheets.RdDMonnaieSheet,
|
||||||
|
sheets.RdDMunitionSheet
|
||||||
|
)
|
||||||
|
|
||||||
|
Items.registerSheet(SYSTEM_RDD, RdDItemSheetV1, {
|
||||||
types: [
|
types: [
|
||||||
"competence", "competencecreature",
|
"competence", "competencecreature",
|
||||||
"recettealchimique", "musique", "chant", "danse", "jeu", "race",
|
"recettealchimique", "musique", "chant", "danse", "jeu", "race",
|
||||||
@ -212,17 +230,17 @@ export class SystemReveDeDragon {
|
|||||||
makeDefault: true
|
makeDefault: true
|
||||||
})
|
})
|
||||||
|
|
||||||
RdDItemSheet.register(RdDBlessureItemSheet)
|
RdDItemSheetV1.register(RdDBlessureItemSheet)
|
||||||
RdDItemSheet.register(RdDConteneurItemSheet)
|
RdDItemSheetV1.register(RdDConteneurItemSheet)
|
||||||
RdDItemSheet.register(RdDFauneItemSheet)
|
RdDItemSheetV1.register(RdDFauneItemSheet)
|
||||||
RdDItemSheet.register(RdDGemmeItemSheet)
|
RdDItemSheetV1.register(RdDGemmeItemSheet)
|
||||||
RdDItemSheet.register(RdDHerbeItemSheet)
|
RdDItemSheetV1.register(RdDHerbeItemSheet)
|
||||||
RdDItemSheet.register(RdDIngredientItemSheet)
|
RdDItemSheetV1.register(RdDIngredientItemSheet)
|
||||||
RdDItemSheet.register(RdDPlanteItemSheet)
|
RdDItemSheetV1.register(RdDPlanteItemSheet)
|
||||||
RdDItemSheet.register(RdDPotionItemSheet)
|
RdDItemSheetV1.register(RdDPotionItemSheet)
|
||||||
RdDItemSheet.register(RdDRencontreItemSheet)
|
RdDItemSheetV1.register(RdDRencontreItemSheet)
|
||||||
RdDItemSheet.register(RdDServiceItemSheet)
|
RdDItemSheetV1.register(RdDServiceItemSheet)
|
||||||
RdDItemSheet.register(RdDSigneDraconiqueItemSheet)
|
RdDItemSheetV1.register(RdDSigneDraconiqueItemSheet)
|
||||||
RdDJournalSheet.register()
|
RdDJournalSheet.register()
|
||||||
|
|
||||||
// préparation des différents modules
|
// préparation des différents modules
|
||||||
|
@ -3,11 +3,11 @@ import { RdDItem } from "./item.js";
|
|||||||
|
|
||||||
export class RdDSheetUtility {
|
export class RdDSheetUtility {
|
||||||
|
|
||||||
static mergeDocumentRights(options, document, editable) {
|
static getOptions(document, editable) {
|
||||||
const userRightLevel = game.user.isGM
|
const userRightLevel = game.user.isGM
|
||||||
? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
||||||
: document.getUserLevel(game.user);
|
: document.getUserLevel(game.user);
|
||||||
let newOptions = {
|
return {
|
||||||
isGM: game.user.isGM,
|
isGM: game.user.isGM,
|
||||||
isOwned: document.parent ? true : false,
|
isOwned: document.parent ? true : false,
|
||||||
editable: editable,
|
editable: editable,
|
||||||
@ -16,10 +16,15 @@ export class RdDSheetUtility {
|
|||||||
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
||||||
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static mergeDocumentRights(options, document, editable) {
|
||||||
|
const newOptions = RdDSheetUtility.getOptions(document, editable);
|
||||||
foundry.utils.mergeObject(options, newOptions);
|
foundry.utils.mergeObject(options, newOptions);
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static getItem(event, actor) {
|
static getItem(event, actor) {
|
||||||
return actor.items.get(RdDSheetUtility.getItemId(event))
|
return actor.items.get(RdDSheetUtility.getItemId(event))
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ import { Draconique } from "./draconique.js";
|
|||||||
import { PixiTMR } from "./pixi-tmr.js";
|
import { PixiTMR } from "./pixi-tmr.js";
|
||||||
|
|
||||||
const IMAGE_CARTE_TMR = 'image-carte-tmr';
|
const IMAGE_CARTE_TMR = 'image-carte-tmr';
|
||||||
const TMR_V1 = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v1.webp";
|
const TMR_V1 = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v1.webp";
|
||||||
const TMR_V2 = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v2.webp";
|
const TMR_V2 = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v2.webp";
|
||||||
const TMR_V3_COULEUR = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v3-couleur.webp";
|
const TMR_V3_COULEUR = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v3-couleur.webp";
|
||||||
|
|
||||||
export class CarteTmr extends Draconique {
|
export class CarteTmr extends Draconique {
|
||||||
|
|
||||||
|
24
package.json
@ -1,14 +1,36 @@
|
|||||||
{
|
{
|
||||||
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
|
"description": "<h2><em>Rêve de Dragon</em> pour Foundry Virtual TableTop</h2>",
|
||||||
|
"private": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "Creative Commons",
|
||||||
|
"main": "gulpfile.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npx vite build",
|
"build": "npx vite build",
|
||||||
|
"gulp": "gulp",
|
||||||
"packCompendiumsToDist": "node ./tools/packCompendiumsToDist.mjs",
|
"packCompendiumsToDist": "node ./tools/packCompendiumsToDist.mjs",
|
||||||
"packCompendiumsToPublic": "node ./tools/packCompendiumsToPublic.mjs",
|
"packCompendiumsToPublic": "node ./tools/packCompendiumsToPublic.mjs",
|
||||||
"unpackCompendiumsFromPublic": "node ./tools/unpackCompendiumsFromPublic.mjs"
|
"unpackCompendiumsFromPublic": "node ./tools/unpackCompendiumsFromPublic.mjs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@foundryvtt/foundryvtt-cli": "^1.0.3"
|
"@eslint/js": "^9.8.0",
|
||||||
|
"@foundryvtt/foundryvtt-cli": "^1.0.3",
|
||||||
|
"commander": "^11.1.0",
|
||||||
|
"eslint": "^9.9.0",
|
||||||
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
"eslint-plugin-jsdoc": "^48.11.0",
|
||||||
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
|
"globals": "^15.9.0",
|
||||||
|
"less": "^4.1.3",
|
||||||
|
"prettier": "^3.3.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"gulp": "^5.0.0",
|
||||||
|
"gulp-less": "^5.0.0",
|
||||||
"rollup-plugin-visualizer": "^5.12.0"
|
"rollup-plugin-visualizer": "^5.12.0"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ name: Terres médianes du rêve
|
|||||||
type: script
|
type: script
|
||||||
scope: global
|
scope: global
|
||||||
author: Hp9ImM4o9YRTSdfu
|
author: Hp9ImM4o9YRTSdfu
|
||||||
img: systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg
|
img: systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg
|
||||||
command: |-
|
command: |-
|
||||||
const selected = game.system.rdd.RdDUtility.getSelectedActor();
|
const selected = game.system.rdd.RdDUtility.getSelectedActor();
|
||||||
if (!selected) {
|
if (!selected) {
|
||||||
@ -18,8 +18,8 @@ command: |-
|
|||||||
title: `Monter dans les TMR`,
|
title: `Monter dans les TMR`,
|
||||||
content: `Monter dans les TMR`,
|
content: `Monter dans les TMR`,
|
||||||
buttons: {
|
buttons: {
|
||||||
normale: { label: `normale`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("normal") },
|
normale: { label: `normale`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg" alt="Montée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("normal") },
|
||||||
rapide: { label: `rapide`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("rapide") },
|
rapide: { label: `rapide`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres Médianes !"/>`, callback: () => selected.displayTMR("rapide") },
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ sort: 0
|
|||||||
pages:
|
pages:
|
||||||
- name: 'Figure: Documentation MJ/Joueurs'
|
- name: 'Figure: Documentation MJ/Joueurs'
|
||||||
type: image
|
type: image
|
||||||
src: systems/foundryvtt-reve-de-dragon/styles/img/logo.webp
|
src: systems/foundryvtt-reve-de-dragon/assets/logo.webp
|
||||||
title:
|
title:
|
||||||
show: false
|
show: false
|
||||||
level: 1
|
level: 1
|
||||||
@ -94,9 +94,9 @@ pages:
|
|||||||
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/bones.svg" width="25" height="30" /> Encaisser des dommages</li>
|
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/bones.svg" width="25" height="30" /> Encaisser des dommages</li>
|
||||||
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/regen.svg" width="25" height="30" /> Remise à neuf (Uniquement pour le MJ) pour enlever toutes les blessures/états du personnage.</li>
|
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/regen.svg" width="25" height="30" /> Remise à neuf (Uniquement pour le MJ) pour enlever toutes les blessures/états du personnage.</li>
|
||||||
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/sleep.svg" width="25" height="30" /> Le sommeil (dormir une heure, une nuit, gris rêve)</li>
|
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/sleep.svg" width="25" height="30" /> Le sommeil (dormir une heure, une nuit, gris rêve)</li>
|
||||||
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" width="25" height="30" /> Montée dans les Terres Médianes</li>
|
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg" width="25" height="30" /> Montée dans les Terres Médianes</li>
|
||||||
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" width="25" height="30" /> Montée rapide</li>
|
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-rapide.svg" width="25" height="30" /> Montée rapide</li>
|
||||||
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" width="25" height="30" /> Regarder ses terres médianes (sans monter)</li>
|
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-view.svg" width="25" height="30" /> Regarder ses terres médianes (sans monter)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h1>Combat</h1>
|
<h1>Combat</h1>
|
||||||
<p>Pour l'initiative et les attaques, des options sont disponibles
|
<p>Pour l'initiative et les attaques, des options sont disponibles
|
||||||
@ -171,7 +171,7 @@ pages:
|
|||||||
<li>Les retours que vous nous ferez via <a href="https://discord.gg/pPSDNJk">discord</a>
|
<li>Les retours que vous nous ferez via <a href="https://discord.gg/pPSDNJk">discord</a>
|
||||||
(channel #rêve-de-dragon) ;-)</li>
|
(channel #rêve-de-dragon) ;-)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><img style="border:0;display:block;margin-left:auto;margin-right:auto" src="systems/foundryvtt-reve-de-dragon/styles/img/rdd_pause.webp" width="210" height="216" /></p>
|
<p><img style="border:0;display:block;margin-left:auto;margin-right:auto" src="systems/foundryvtt-reve-de-dragon/assets/rdd_pause.webp" width="210" height="216" /></p>
|
||||||
_id: p0xOSy6tZwU4DOq5
|
_id: p0xOSy6tZwU4DOq5
|
||||||
image: {}
|
image: {}
|
||||||
video:
|
video:
|
||||||
|
@ -5,7 +5,7 @@ sort: 0
|
|||||||
pages:
|
pages:
|
||||||
- name: 'Figure: Passeur fou'
|
- name: 'Figure: Passeur fou'
|
||||||
type: image
|
type: image
|
||||||
src: systems/foundryvtt-reve-de-dragon/styles/img/ui/tmp_main_r1.webp
|
src: systems/foundryvtt-reve-de-dragon/assets/ui/tmp_main_r1.webp
|
||||||
title:
|
title:
|
||||||
show: false
|
show: false
|
||||||
level: 1
|
level: 1
|
||||||
|
@ -5,7 +5,7 @@ sort: 0
|
|||||||
pages:
|
pages:
|
||||||
- name: 'Figure: Tourbillon rouge'
|
- name: 'Figure: Tourbillon rouge'
|
||||||
type: image
|
type: image
|
||||||
src: systems/foundryvtt-reve-de-dragon/styles/img/ui/tmp_main_r1.webp
|
src: systems/foundryvtt-reve-de-dragon/assets/ui/tmp_main_r1.webp
|
||||||
title:
|
title:
|
||||||
show: false
|
show: false
|
||||||
level: 1
|
level: 1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: Rêve de Dragon
|
name: Rêve de Dragon
|
||||||
type: rencontre
|
type: rencontre
|
||||||
img: systems/foundryvtt-reve-de-dragon/styles/img/rdd_pause.webp
|
img: systems/foundryvtt-reve-de-dragon/assets/rdd_pause.webp
|
||||||
system:
|
system:
|
||||||
description: ''
|
description: ''
|
||||||
descriptionmj: ''
|
descriptionmj: ''
|
||||||
|
@ -38,7 +38,7 @@ regions: []
|
|||||||
ownership:
|
ownership:
|
||||||
default: 0
|
default: 0
|
||||||
background:
|
background:
|
||||||
src: systems/foundryvtt-reve-de-dragon/styles/img/ecran_rdd.webp
|
src: systems/foundryvtt-reve-de-dragon/assets/ecran_rdd.webp
|
||||||
offsetX: 0
|
offsetX: 0
|
||||||
offsetY: 0
|
offsetY: 0
|
||||||
anchorX: 0
|
anchorX: 0
|
||||||
|