Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
c25320755a | |||
aa5f159a91 | |||
bb80391a47 | |||
1abb757b6b | |||
84c44d1f6d | |||
ccb939207d | |||
cd38a197cc | |||
6b053b189b | |||
cc4cbbc771 | |||
0850789ed7 | |||
7a6ccac7fa | |||
ed64d823ac | |||
3162264afa | |||
e53eda5b42 | |||
47a7564a1c | |||
f7a6fee51d | |||
0b3f08ef29 | |||
8df9c8ddf5 | |||
4cbe652a91 | |||
3eb1179c40 | |||
cf185844af | |||
250b936fae | |||
cd8268f569 | |||
c04e0cec78 | |||
1d5fe1af71 | |||
e96a627c37 | |||
06c3d2f80a | |||
d07f5a41e7 | |||
856d038dc9 | |||
791593ad38 | |||
42179dab1d | |||
83631cd366 | |||
01cf47ad55 | |||
d492b37a45 | |||
ecdcdb69d5 | |||
8479fdda8a | |||
83e57fbbc7 | |||
2d256b1217 | |||
526d38d32e | |||
2ff3dfef89 | |||
f1b6c01cd7 | |||
675fe5838e | |||
bafdec9924 |
@ -1,6 +1,6 @@
|
||||
name: Release Creation
|
||||
|
||||
on:
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
@ -9,9 +9,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository will cloned to the runner."
|
||||
|
||||
|
||||
#- uses: actions/checkout@v3
|
||||
- uses: RouxAntoine/checkout@v3.5.4
|
||||
with:
|
||||
ref: 'v13'
|
||||
|
||||
# get part of the tag after the `v`
|
||||
- name: Extract tag version number
|
||||
@ -29,7 +31,7 @@ jobs:
|
||||
url: https://www.uberwald.me/gitea/${{gitea.repository}}
|
||||
manifest: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json
|
||||
download: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/rddsystem.zip
|
||||
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
@ -37,7 +39,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
|
||||
- name: Build the compendiums
|
||||
run: node ./tools/packCompendiumsToDist.mjs
|
||||
|
||||
@ -46,29 +48,29 @@ jobs:
|
||||
apt update -y
|
||||
apt install -y zip
|
||||
|
||||
- run: zip -r ./rddsystem.zip system.json template.json README.md LICENSE.txt assets/ fonts/ icons lang/ module/ packs/ pic/ sounds/ styles/ templates/
|
||||
|
||||
- run: zip -r ./rddsystem.zip system.json template.json README.md LICENSE.txt assets/ css/ fonts/ icons lang/ module/ packs/ pic/ sounds/ styles/ templates/
|
||||
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
|
||||
- name: Use Go Action
|
||||
|
||||
- name: Use Go Action
|
||||
id: use-go-action
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
./rddsystem.zip
|
||||
./rddsystem.zip
|
||||
system.json
|
||||
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
|
||||
|
||||
- name: Publish to Foundry server
|
||||
uses: djlechuck/foundryvtt-publish-package-action@v1
|
||||
with:
|
||||
token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
|
||||
id: 'foundryvtt-reve-de-dragon'
|
||||
version: ${{github.event.release.tag_name}}
|
||||
manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
|
||||
notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md'
|
||||
compatibility-minimum: '12'
|
||||
compatibility-verified: '12'
|
||||
#- name: Publish to Foundry server
|
||||
# uses: djlechuck/foundryvtt-publish-package-action@v1
|
||||
# with:
|
||||
# token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
|
||||
# id: 'foundryvtt-reve-de-dragon'
|
||||
# version: ${{github.event.release.tag_name}}
|
||||
# manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
|
||||
# notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v13/changelog.md'
|
||||
# compatibility-minimum: '13'
|
||||
# compatibility-verified: '13'
|
@ -1,14 +0,0 @@
|
||||
Pour que le bug soit traité, merci de préciser quelques détails.
|
||||
|
||||
### Environment
|
||||
|
||||
> Indiquez quelques éléments de votre installation
|
||||
|
||||
* Foundry VTT Version: (Example 0.5.4)
|
||||
* OS: [Windows, MacOS, Linux (which distro)]
|
||||
* Modules ?: Liste des modules utilisés
|
||||
|
||||
### Description du problème
|
||||
|
||||
|
||||
/label ~Bug ~Nonrepro
|
@ -1,14 +0,0 @@
|
||||
|
||||
### Résumé de la fonctionnalité
|
||||
|
||||
> Décrivez de manière simple et concise la fonction que vous voulez voir ajoutée.
|
||||
|
||||
### Expérience Utilisateur
|
||||
|
||||
> Indiquez ce que l'utilisateur aura comme bénéfice avec cette fonction.
|
||||
|
||||
### Priority/Importance
|
||||
|
||||
> Selon vous, quelle est l'importance de cette fonctionnalité.
|
||||
|
||||
/label ~Feature
|
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 |
36
changelog.md
@ -1,3 +1,9 @@
|
||||
# 13.0
|
||||
|
||||
## 13.0.0 - Le début de l'errance d'Illysis
|
||||
|
||||
- Migration vers la version 13 de Foundry
|
||||
|
||||
# 12.0
|
||||
## 12.0.50 - Le sommeil d'Astrobazzarh
|
||||
- Le don de double rêve n'interrompt plus le sommeil toutes les heures
|
||||
@ -20,7 +26,7 @@
|
||||
## 12.0.47
|
||||
- Correction sur les mise à jour en cascade -
|
||||
- Correction sur le force rendering après un changement de competence
|
||||
|
||||
|
||||
## 12.0.46 - Le double demi d'Astrobazzarh
|
||||
- correction des raffraîchissement lors du sommeil qui empêchait de dormir
|
||||
plusieurs heures
|
||||
@ -48,22 +54,18 @@
|
||||
- Correction des jets `@roll[vue/-2]` qui tentaient de chercher une compétence -2 (à cause des armes à 1/2 mains)
|
||||
|
||||
## 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
|
||||
|
||||
- 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
|
||||
|
||||
## 12.0.38 - Les prévisions d'Astrobazzarh
|
||||
|
||||
- Correction de modifications de personnages qui ne s'affichaient pas:
|
||||
- changements d'endurance/vie/fatigue, transformé, ...
|
||||
- Migration des compétences "Ecriture" en "Écriture" dans les tâches, livres, oeuvres et méditations
|
||||
@ -73,14 +75,12 @@
|
||||
- utilisation de l'extension hbs pour tous les fichiers handlebars
|
||||
|
||||
## 12.0.37 - Les enchantements d'Astrobazzarh
|
||||
|
||||
- les potions ont un état, seules les potions liquides sont enchantables
|
||||
- les lancements de sorts du jour sont conservés jusqu'à chateau dormant
|
||||
- lorsqu'un joueur souhaite enchanter une potion, les sorts d'enchantements/purification/permanence doivent avoir été lancés auparavant
|
||||
- on peut enchanter des gemmes exactement comme des potions
|
||||
|
||||
## 12.0.36 - L'alchimie d'Astrobazzarh
|
||||
|
||||
- Nouveautés
|
||||
- ajout d'un bouton pour enchanter les potions
|
||||
- standardisation des boutons d'actions sur les items
|
||||
@ -95,16 +95,14 @@
|
||||
- Corrections de descriptions pour proposer les jet de dés
|
||||
|
||||
## 12.0.35 - La Solution d'Astrobazzarh
|
||||
|
||||
- Fix problème d'initialisation des feuilles d'items
|
||||
|
||||
## 12.0.34 - la tête d'Astrobazzarh
|
||||
|
||||
- support de liens "jets de dés"
|
||||
- on peut ajouter des liens "jet de dés" dans les journaux, descriptions, notes, maladresses, ...
|
||||
- avec la syntaxe `@roll[...]` on peut ajouter le lien vers:
|
||||
- un jet de caractéristique/compétence `@roll[carac/competence/difficulte]` / `@roll[carac/difficulte]` / `@roll[carac/competence]`
|
||||
- une formule foundry `@roll[2d6]` pour lancer 2d6
|
||||
- un jet de caractéristique/compétence `@roll[carac/competence/difficulte]` / `@roll[carac/difficulte]` / `@roll[carac/competence]`
|
||||
- une formule foundry `@roll[2d6]` pour lancer 2d6
|
||||
- une manipulation alchimique `@roll[couleur vert-bleu]`
|
||||
- les liens "jet avec caractéristiques" s'appliquent:
|
||||
- à tous les tokens sélectionnés
|
||||
@ -114,26 +112,21 @@
|
||||
- gestion des blocs secrets dans les descriptions
|
||||
|
||||
## 12.0.33 - la vieillesse d'Astrobazzarh
|
||||
|
||||
- retour de l'expérience pour les joueurs
|
||||
- suppression du message "Pas de caractéristique" sur les jets d'odorat-goût
|
||||
|
||||
## 12.0.32 - les rêveries d'Astrobazzarh
|
||||
|
||||
- Ajout des Items Race pour gérer les ajustements liés aux races
|
||||
|
||||
## 12.0.31 - le mausolée d'Astrobazzarh
|
||||
|
||||
- Correction: les automatisation de combat jouer-MJ fonctionnentde nouveau
|
||||
|
||||
## 12.0.30 - le cauchemar d'Astrobazzarh
|
||||
|
||||
- calcul automatique du niveau des entités selon leur rêve
|
||||
- la description des créatures venimeuses contient un lien vers leur venin
|
||||
- Correction: les messages de combats ne marchaient plus (Changement combiné Foundry + rêve de Dragon)
|
||||
|
||||
## 12.0.29 - L'indexation d'Astrobazzarh
|
||||
|
||||
- les liens dans la descriptions des sorts pointent vers les sorts du compendium
|
||||
- la description du chrasme contient le lien vers son venin plutôt qu'un tableau
|
||||
|
||||
@ -174,7 +167,7 @@
|
||||
- les tas dans les conteneurs peuvent être désempilés sans rendre le conteneur inutilisable
|
||||
- les conteneurs ne peuvent plus être empilés (pour éviter que le contenu de Schroedinger quand on les sépare)
|
||||
- on peut maintenant saisir et supprimer les bonus de cases de manière intuitive
|
||||
|
||||
|
||||
## 12.0.23 - La bibliothèque d'Astrobazzarh
|
||||
- corrections mineures
|
||||
- meilleure gestion de la parade des armes naturelles
|
||||
@ -285,7 +278,7 @@
|
||||
|
||||
## 12.0.6 - Le bazar d'Astrobazzarh
|
||||
- Corrections de l'inventaire en bazar:
|
||||
- un problème pouvait survenir en déplaçant les objets
|
||||
- un problème pouvait survenir en déplaçant les objets
|
||||
l'inventaire, qui fait qu'un conteneur se retrouve récursivement dans son
|
||||
propre contenu, ce qui empêche d'ouvrir la feuille d'acteur.
|
||||
- un objet non-conteneur pouvait dans certains cas avoir un pseudo contenu
|
||||
@ -293,7 +286,7 @@
|
||||
conteneur (et donc non affiché)
|
||||
- vider les conteneurs supprime correctement toutes les informations liées
|
||||
aux conteneurs/contenus
|
||||
- Les messages pour les tirages dans le compendium utilisent le "roll mode"
|
||||
- Les messages pour les tirages dans le compendium utilisent le "roll mode"
|
||||
courant pour leur visibilité
|
||||
- Fix: restaurer la compatibilité Foundry 11
|
||||
|
||||
@ -388,7 +381,7 @@
|
||||
|
||||
## 11.2.9 - La barbe d'Akarlikarlikar
|
||||
- Amélioration des textes de tooltips
|
||||
- Les tooltips sont plus dans le thème de couleur du système Rêve de Dragon
|
||||
- Les tooltips sont plus dans le thème de couleur du système Rêve de Dragon
|
||||
- Ajouts d'icones pour les attaque/initiative/soins dans les raccourcis sur les tokens (HUD)
|
||||
- Ajout d'une icône et transformation en bouton du lien pour accéder à l'astrologie et aux chiffres astraux
|
||||
- Suppression de message de log inutile sur chaque point de coeur
|
||||
@ -508,7 +501,7 @@ Vu qu'elles ne peuvent pas être utilisées, permet de savoir pourquoi
|
||||
- le message annonçant le joueur dont c'est le tour ne contient plus d'informations de santé
|
||||
- un message avec les informations de santé est envoyé au Gardienn et au propriétaire du token.acteur
|
||||
- le jet de vie est bien fait par le token si besoin
|
||||
- seul les propriétaires peuvent faire les jets de vie
|
||||
- seul les propriétaires peuvent faire les jets de vie
|
||||
- Amélioration de la fenêtre de jets
|
||||
- le type de dégâts pour les attaques est toujours affiché
|
||||
- le moral est indiqué avant l'icone d'appel au moral
|
||||
@ -615,4 +608,3 @@ Vu qu'elles ne peuvent pas être utilisées, permet de savoir pourquoi
|
||||
- correction des achats par le MJ sans acteur sélectionné
|
||||
|
||||
Cf branche v10 pour l'historique des versions 10
|
||||
|
||||
|
2215
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;
|
45
less/colors.less
Normal file
@ -0,0 +1,45 @@
|
||||
:root {
|
||||
|
||||
/* =================== 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);
|
||||
}
|
||||
|
84
less/fonts.less
Normal file
@ -0,0 +1,84 @@
|
||||
/* ==================== (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;
|
||||
}
|
||||
|
||||
: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;
|
||||
}
|
||||
|
||||
/* Global styles & Font */
|
||||
.window-app {
|
||||
font-family: CaslonAntique;
|
||||
text-align: justify;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
/* Fonts */
|
||||
.sheet header.sheet-header h1 input,
|
||||
.window-app .window-header,
|
||||
#actors .directory-list,
|
||||
#navigation #scene-list .scene.nav-item {
|
||||
font-family: "GoudyAcc"
|
||||
}
|
||||
|
||||
/* For title, sidebar character and scene */
|
||||
.sheet nav.sheet-tabs,
|
||||
.window-app input,
|
||||
.sheet header.sheet-header .header-compteurs,
|
||||
.sheet header.sheet-header .flex-group-center.flex-fatigue,
|
||||
select, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
|
||||
font-family: "CaslonAntique"; /* For sheet parts; For nav and title */
|
||||
}
|
2089
less/foundryvtt-reve-de-dragon.less
Normal file
10
less/item/monnaie.less
Normal file
@ -0,0 +1,10 @@
|
||||
.application.sheet.fvtt-rdd {
|
||||
.sheet-common();
|
||||
section.window-content{
|
||||
padding: 0rem;
|
||||
|
||||
section header.sheet-header {
|
||||
.sheet-header();
|
||||
}
|
||||
}
|
||||
}
|
32
less/sheets.less
Normal file
@ -0,0 +1,32 @@
|
||||
.sheet-common() {
|
||||
|
||||
.window-content{
|
||||
font-family: CaslonAntique;
|
||||
text-align: justify;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 1px;
|
||||
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
color: var(--color-dark-1);
|
||||
background: var(--background-image-base) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.sheet-header() {
|
||||
background: #011d33 url(../assets/ui/bg_header.webp) no-repeat left top;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
|
||||
:is(
|
||||
input[type="text"],
|
||||
input[type="number"],
|
||||
input[type="password"],
|
||||
input[type="datetime-local"],
|
||||
input[type="date"],
|
||||
input[type="time"]) {
|
||||
color: rgba(255, 255, 255, 0.75);
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 0 none;
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
}
|
@ -1795,10 +1795,8 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
};
|
||||
RollDataAjustements.calcul(rollData, this);
|
||||
await RdDResolutionTable.rollData(rollData);
|
||||
await RdDRollResult.displayRollData(rollData, this)
|
||||
|
||||
this.gererExperience(rollData);
|
||||
|
||||
await RdDRollResult.displayRollData(rollData, this)
|
||||
return rollData.rolled;
|
||||
}
|
||||
|
||||
|
@ -14,11 +14,11 @@ import { ItemAction } from "../item/item-actions.js";
|
||||
* Extend the basic ActorSheet with some very simple modifications
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
export class RdDBaseActorSheet extends ActorSheet {
|
||||
export class RdDBaseActorSheet extends foundry.appv1.sheets.ActorSheet {
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(ActorSheet.defaultOptions, {
|
||||
return foundry.utils.mergeObject(foundry.appv1.sheets.ActorSheet.defaultOptions, {
|
||||
classes: ["rdd", "sheet", "actor"],
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
|
||||
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }],
|
||||
|
@ -734,7 +734,7 @@ export class RdDBaseActor extends Actor {
|
||||
name: this.getAlias(),
|
||||
system: { description: this.system.description }
|
||||
}
|
||||
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.hbs', chatData)
|
||||
foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.hbs', chatData)
|
||||
.then(html => ChatMessage.create(RdDUtility.chatDataSetup(html, modeOverride)));
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.
|
||||
|
||||
export class RdDActorExportSheet extends RdDActorSheet {
|
||||
static init() {
|
||||
loadTemplates([
|
||||
foundry.applications.handlebars.loadTemplates([
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs",
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs",
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessures.hbs",
|
||||
@ -21,7 +21,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs",
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/sort.hbs",
|
||||
])
|
||||
Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
|
||||
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
|
||||
}
|
||||
|
||||
static get defaultOptions() {
|
||||
|
@ -3,7 +3,7 @@ import { Misc } from "../../misc.js"
|
||||
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.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 {
|
||||
|
||||
|
@ -26,7 +26,7 @@ const RANDOM_VALUES = {
|
||||
|
||||
export class AppPersonnageAleatoire extends FormApplication {
|
||||
static preloadHandlebars() {
|
||||
loadTemplates([
|
||||
foundry.applications.handlebars.loadTemplates([
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs',
|
||||
])
|
||||
}
|
||||
|
5
module/applications/sheets/_module.mjs
Normal file
@ -0,0 +1,5 @@
|
||||
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"
|
||||
export { default as RdDTarotSheet } from "./tarot-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
|
||||
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||
label: Misc.typeName('Item', itemType),
|
||||
types: [itemType],
|
||||
makeDefault: true
|
||||
})
|
||||
})
|
||||
foundry.applications.handlebars.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)
|
||||
)
|
||||
}
|
||||
}
|
33
module/applications/sheets/tarot-sheet.mjs
Normal file
@ -0,0 +1,33 @@
|
||||
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 RdDTarotSheet extends RdDItemBaseSheet {
|
||||
/** @override */
|
||||
static get ITEM_TYPE() { return ITEM_TYPES.tarot }
|
||||
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION] }
|
||||
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = Object.assign({},
|
||||
RdDItemBaseSheet.DEFAULT_OPTIONS,
|
||||
{
|
||||
classes: ["fvtt-rdd", "item", "tarot"],
|
||||
position: { width: 400 },
|
||||
window: { contentClasses: ["tarot-content"] }
|
||||
})
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/tarot.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
return Object.assign(
|
||||
await super._prepareContext(),
|
||||
await TEMPLATE_DESCRIPTION.prepareContext(this.document)
|
||||
)
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ const TEXT_ROLL_MANAGERS = [
|
||||
|
||||
export class RdDTextEditor {
|
||||
static registerChatCallbacks(html) {
|
||||
html.on("click", '.roll-text', async event => await RdDTextEditor.rollText(event))
|
||||
$(html).on("click", '.roll-text', async event => await RdDTextEditor.rollText(event))
|
||||
}
|
||||
|
||||
static async enrichHTML(text, object, options = {showlink:true}) {
|
||||
@ -30,7 +30,7 @@ export class RdDTextEditor {
|
||||
context.text = await manager.onReplaceRoll(context);
|
||||
}
|
||||
|
||||
return await TextEditor.enrichHTML(context.text, {
|
||||
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(context.text, {
|
||||
relativeTo: object,
|
||||
secrets: object?.isOwner,
|
||||
async: true
|
||||
|
@ -5,12 +5,12 @@ import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
|
||||
|
||||
/**
|
||||
* Class providing helper methods to get the list of users, and
|
||||
* Class providing helper methods to get the list of users, and
|
||||
*/
|
||||
export class ChatUtility {
|
||||
|
||||
static async init() {
|
||||
Hooks.on("renderChatMessage", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
|
||||
Hooks.on("renderChatMessageHTML", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
|
||||
Hooks.on("createChatMessage", async (chatMessage, options, id) => await ChatUtility.onCreateChatMessage(chatMessage, options, id))
|
||||
}
|
||||
|
||||
@ -190,8 +190,8 @@ export class ChatUtility {
|
||||
if (rddTimestamp) {
|
||||
const timestamp = new RdDTimestamp(rddTimestamp);
|
||||
const timestampData = timestamp.toCalendrier();
|
||||
const dateHeure = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
|
||||
html.find('header.message-header .message-sender').after(dateHeure)
|
||||
const dateHeure = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
|
||||
$(html).find('header.message-header .message-sender').after(dateHeure)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,13 @@ const INFO_COEUR = 'info-coeur';
|
||||
|
||||
export class RdDCoeur {
|
||||
static registerChatCallbacks(html) {
|
||||
html.on("click", 'a.accepter-tendre-moment', event => {
|
||||
$(html).on("click", 'a.accepter-tendre-moment', event => {
|
||||
RdDCoeur.accepterTendreMoment(RdDCoeur.extractInfoCoeur(event))
|
||||
})
|
||||
html.on("click", 'a.refuser-tendre-moment', event => {
|
||||
$(html).on("click", 'a.refuser-tendre-moment', event => {
|
||||
RdDCoeur.refuserTendreMoment(RdDCoeur.extractInfoCoeur(event))
|
||||
})
|
||||
html.on("click", 'a.perdre-point-coeur-douceur', event => {
|
||||
$(html).on("click", 'a.perdre-point-coeur-douceur', event => {
|
||||
RdDCoeur.perdreEnDouceur(
|
||||
RdDCoeur.extractInfoCoeur(event),
|
||||
event.currentTarget.attributes['data-actor-id'].value)
|
||||
|
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 {}
|
||||
}
|
||||
}
|
3
module/documents/_module.mjs
Normal file
@ -0,0 +1,3 @@
|
||||
export { default as RdDModelMonnaie } from "./monnaie.mjs"
|
||||
export { default as RdDModelMunition } from "./munition.mjs"
|
||||
export { default as RdDModelTarot } from "./tarot.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'
|
||||
}
|
||||
}
|
7
module/documents/tarot.mjs
Normal file
@ -0,0 +1,7 @@
|
||||
import { RdDItem } from "../item.js";
|
||||
|
||||
export default class RdDItemTarot extends RdDItem {
|
||||
static get defaultIcon() {
|
||||
return 'systems/foundryvtt-reve-de-dragon/icons/objets/tarot.webp'
|
||||
}
|
||||
}
|
@ -14,12 +14,11 @@ import { RdDItem } from "./item.js";
|
||||
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { ItemAction } from "./item/item-actions.js";
|
||||
import { RdDItemGemme } from "./item/gemme.js";
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet for RdD specific items
|
||||
*/
|
||||
export class RdDItemSheet extends ItemSheet {
|
||||
export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
|
||||
|
||||
static get ITEM_TYPE() {
|
||||
return undefined
|
||||
@ -32,7 +31,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
}
|
||||
|
||||
static register(sheetClass) {
|
||||
Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, sheetClass, {
|
||||
label: Misc.typeName('Item', sheetClass.ITEM_TYPE),
|
||||
types: [sheetClass.ITEM_TYPE],
|
||||
makeDefault: true
|
||||
@ -43,7 +42,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||
classes: [SYSTEM_RDD, "sheet", "item"],
|
||||
template: RdDItemSheet.defaultTemplate(RdDItemSheet.ITEM_TYPE),
|
||||
template: RdDItemSheetV1.defaultTemplate(RdDItemSheetV1.ITEM_TYPE),
|
||||
width: 550,
|
||||
height: 550
|
||||
}, { inplace: false });
|
||||
@ -51,7 +50,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
get template() {
|
||||
return RdDItemSheet.defaultTemplate(this.item.type);
|
||||
return RdDItemSheetV1.defaultTemplate(this.item.type);
|
||||
}
|
||||
|
||||
get title() {
|
||||
@ -101,7 +100,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
|
||||
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
|
||||
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),
|
||||
categories: RdDItem.getCategories(this.item.type),
|
||||
}
|
||||
@ -264,7 +263,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
_updateObject(event, formData) {
|
||||
switch (this.item.type) {
|
||||
case ITEM_TYPES.sort:
|
||||
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheet._listCaseTmr(
|
||||
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheetV1._listCaseTmr(
|
||||
formData.caseTmrCoord,
|
||||
formData.caseTmrBonus,
|
||||
formData.caseTmrAdd
|
||||
@ -314,7 +313,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
|
||||
async _onDrop(event) {
|
||||
// Try to extract the dragData
|
||||
let dragData = RdDItemSheet.$extractDragData(event);
|
||||
let dragData = RdDItemSheetV1.$extractDragData(event);
|
||||
if (!dragData) return false;
|
||||
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
|
||||
if (allowed === false) return false;
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { HtmlUtility } from "../html-utility.js";
|
||||
import { RdDItemSheet } from "../item-sheet.js";
|
||||
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||
import { Misc } from "../misc.js";
|
||||
import { RdDRaretes } from "./raretes.js";
|
||||
|
||||
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
||||
|
||||
export class RdDItemInventaireSheet extends RdDItemSheet {
|
||||
export class RdDItemInventaireSheet extends RdDItemSheetV1 {
|
||||
|
||||
static get defaultOptions() {
|
||||
return foundry.utils.mergeObject(RdDItemSheet.defaultOptions, {
|
||||
return foundry.utils.mergeObject(RdDItemSheetV1.defaultOptions, {
|
||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
||||
}, { 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" };
|
||||
|
||||
|
@ -9,7 +9,7 @@ export class RdDFauneItemSheet extends RdDItemInventaireSheet {
|
||||
|
||||
if (!this.options.editable) return;
|
||||
|
||||
html.find("a.linked-actor-delete").click(async event => await this.onDeleteLinkedActor());
|
||||
$(html).find("a.linked-actor-delete").click(async event => await this.onDeleteLinkedActor());
|
||||
}
|
||||
|
||||
async _onDropActor(event, dragData) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
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" };
|
||||
|
||||
|
@ -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" };
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { RdDItemSheet } from "../item-sheet.js";
|
||||
import { RdDItemSheetV1 } from "../item-sheet.js";
|
||||
import { RdDItemSigneDraconique } from "./signedraconique.js";
|
||||
import { TMRUtility } from "../tmr-utility.js";
|
||||
|
||||
/**
|
||||
* 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" }
|
||||
|
||||
@ -36,9 +36,9 @@ export class RdDSigneDraconiqueItemSheet extends RdDItemSheet {
|
||||
|
||||
if (!this.options.editable) return;
|
||||
|
||||
html.find(".signe-aleatoire").click(async event => await this.setSigneAleatoire());
|
||||
html.find("input.select-tmr").change(async event => await this.onSelectTmr(event));
|
||||
html.find(".signe-xp-sort").change(async event => await this.onValeurXpSort(event.currentTarget.attributes['data-typereussite']?.value, Number(event.currentTarget.value)));
|
||||
$(html).find(".signe-aleatoire").click(async event => await this.setSigneAleatoire());
|
||||
$(html).find("input.select-tmr").change(async event => await this.onSelectTmr(event));
|
||||
$(html).find(".signe-xp-sort").change(async event => await this.onValeurXpSort(event.currentTarget.attributes['data-typereussite']?.value, Number(event.currentTarget.value)));
|
||||
}
|
||||
|
||||
async setSigneAleatoire() {
|
||||
|
@ -3,10 +3,10 @@ import { SYSTEM_RDD } from "../constants.js";
|
||||
import { Misc } from "../misc.js";
|
||||
|
||||
|
||||
export class RdDJournalSheet extends JournalTextPageSheet {
|
||||
export class RdDJournalSheet extends foundry.appv1.sheets.JournalTextPageSheet {
|
||||
static register() {
|
||||
DocumentSheetConfig.unregisterSheet(JournalEntryPage, "core", JournalTextPageSheet)
|
||||
DocumentSheetConfig.registerSheet(JournalEntryPage,
|
||||
foundry.applications.apps.DocumentSheetConfig.unregisterSheet(JournalEntryPage, "core", foundry.appv1.sheets.JournalTextPageSheet)
|
||||
foundry.applications.apps.DocumentSheetConfig.registerSheet(JournalEntryPage,
|
||||
SYSTEM_RDD,
|
||||
RdDJournalSheet, {
|
||||
types: ["text"],
|
||||
|