Managegems

This commit is contained in:
sladecraven 2021-10-29 15:15:54 +02:00
parent 52332c2ab1
commit 213e810b4e
6 changed files with 19 additions and 6 deletions

View File

@ -7,6 +7,7 @@
},
"ITEM": {
"TypeObjet": "Objet",
"TypeGemme": "Gemme",
"TypeCompetence": "Compétence",
"TypeCompetencecreature": "Compétence de créature",
"TypeMaladie": "Maladie",

View File

@ -3,7 +3,7 @@ import { Grammar } from "./grammar.js";
import { Misc } from "./misc.js";
import { RdDUtility } from "./rdd-utility.js";
const typesObjetsEquipement = ["objet", "arme", "armure", "conteneur", "herbe", "ingredient", "livre", "potion", "munition", "nourritureboisson", "monnaie"];
const typesObjetsEquipement = ["objet", "arme", "armure", "gemme", "conteneur", "herbe", "ingredient", "livre", "potion", "munition", "nourritureboisson", "monnaie"];
const typesObjetsOeuvres = ["oeuvre", "recettecuisine", "musique", "chant", "danse", "jeu"];
const encBrin = 0.00005;// un brin = 1 décigramme = 1/10g = 1/10000kg = 1/20000 enc

View File

@ -375,6 +375,7 @@ export class RdDUtility {
formData.musiques = this.checkNull(formData.itemsByType['musique']);
formData.oeuvres = this.checkNull(formData.itemsByType['oeuvre']);
formData.jeux = this.checkNull(formData.itemsByType['jeu']);
formData.gemmes = this.checkNull(formData.itemsByType['gemme']);
formData.recettescuisine = this.checkNull(formData.itemsByType['recettecuisine']);
formData.recettesAlchimiques = this.checkNull(formData.itemsByType['recettealchimique']);
formData.objets = formData.conteneurs.concat(formData.materiel)
@ -386,6 +387,7 @@ export class RdDUtility {
.concat(formData.herbes)
.concat(formData.ingredients)
.concat(formData.nourritureboissons)
.concat(formData.gemmes)
.concat(formData.monnaie);
formData.competences = (formData.itemsByType.competence ?? []).concat(formData.itemsByType.competencecreature ?? []);
formData.monnaie.sort(Monnaie.triValeurDenier());

View File

@ -2,11 +2,11 @@
"name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT",
"version": "1.5.11",
"version": "1.5.13",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "0.8.9",
"templateVersion": 119,
"templateVersion": 121,
"author": "LeRatierBretonnien",
"authors": [
{

View File

@ -585,6 +585,8 @@
"gemme": {
"type": "",
"description": "",
"encombrement": 0,
"quantite": 1,
"cout": 0,
"taille": 0,
"purete": 0,

View File

@ -28,17 +28,25 @@
<label>Qualité</label>
<input class="attribute-value" type="text" name="data.qualite" value="{{data.qualite}}" data-dtype="Number" />
</div>
<div class="form-group">
<label>Encombrement</label>
<input class="attribute-value" type="text" name="data.encombrement" value="{{data.encombrement}}" data-dtype="Number" />
</div>
<div class="form-group">
<label>Quantité</label>
<input class="attribute-value" type="text" name="data.quantite" value="{{data.quantite}}" data-dtype="Number" />
</div>
<div class="form-group">
<label>Inertie</label>
<input class="attribute-value" type="text" name="data.inertie" value="{{data.inertie}}" data-dtype="Number" />
<input class="attribute-value" type="text" name="data.inertie" value="{{data.inertie}}" data-dtype="Number" disabled/>
</div>
<div class="form-group">
<label>Enchantabilité</label>
<input class="attribute-value" type="text" name="data.enchantabilite" value="{{data.enchantabilite}}" data-dtype="Number" />
<input class="attribute-value" type="text" name="data.enchantabilite" value="{{data.enchantabilite}}" data-dtype="Number" disabled/>
</div>
<div class="form-group">
<label>Prix</label>
<input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number" />
<input class="attribute-value" type="text" name="data.cout" value="{{data.cout}}" data-dtype="Number" disabled/>
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}