From 5e7a5f4ccbbf410df6f50f1baf8635abc5739491 Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sun, 20 Sep 2020 21:45:46 +0200 Subject: [PATCH] Fix creature again --- module/actor-creature-sheet.js | 5 +- module/actor-sheet.js | 4 +- system.json | 2 +- templates/actor-creature-sheet.html | 353 ++++++++++++++-------------- 4 files changed, 179 insertions(+), 185 deletions(-) diff --git a/module/actor-creature-sheet.js b/module/actor-creature-sheet.js index 31c83701..5c85d0a8 100644 --- a/module/actor-creature-sheet.js +++ b/module/actor-creature-sheet.js @@ -6,7 +6,7 @@ import { RdDUtility } from "./rdd-utility.js"; -const creatureCarac = [ "taille", "constitution", "force", "perception", "volonte", "reve" ] +/* -------------------------------------------- */ export class RdDActorCreatureSheet extends ActorSheet { /** @override */ @@ -54,7 +54,8 @@ export class RdDActorCreatureSheet extends ActorSheet { data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.liste ); data.data.competencecreature = data.itemsByType["competencecreature"]; - + + console.log("DATA:", data); return data; } diff --git a/module/actor-sheet.js b/module/actor-sheet.js index fc9564d9..7ad9afff 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -5,6 +5,7 @@ import { RdDUtility } from "./rdd-utility.js"; +/* -------------------------------------------- */ export class RdDActorSheet extends ActorSheet { /** @override */ @@ -20,7 +21,6 @@ export class RdDActorSheet extends ActorSheet { } /* -------------------------------------------- */ - _checkNull(items) { if (items && items.length) { return items; @@ -29,7 +29,6 @@ export class RdDActorSheet extends ActorSheet { } /* -------------------------------------------- */ - getData() { let data = super.getData(); @@ -102,7 +101,6 @@ export class RdDActorSheet extends ActorSheet { data.data.nbLegeres = this.actor.GetNumberBlessures(data.data.blessures.legeres.liste ); data.data.nbGraves = this.actor.GetNumberBlessures(data.data.blessures.graves.liste ); data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.liste ); - console.log( data.data.compteurs ); // low is normal, this the base used to compute the grid. data.data.fatigueHTML = "" + RdDUtility.makeHTMLfatigueMatrix( data.data.sante.fatigue.value, data.data.sante.endurance.max ).html() + "
"; diff --git a/system.json b/system.json index be92ce2d..42b41f20 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.13", + "version": "0.9.14", "minimumCoreVersion": "0.6.0", "compatibleCoreVersion": "0.6.6", "templateVersion": 37, diff --git a/templates/actor-creature-sheet.html b/templates/actor-creature-sheet.html index 7886088b..3495b6d4 100644 --- a/templates/actor-creature-sheet.html +++ b/templates/actor-creature-sheet.html @@ -1,193 +1,188 @@
- {{!-- Sheet Header --}} -
- -
-

-
-
-
Blessures légères : {{data.nbLegeres}}
-
Blessures graves : {{data.nbGraves}}
-
Blessure critique : {{data.nbCritiques}}
-
-
+ {{!-- Sheet Header --}} +
+ +
+

+
+
+
Blessures légères : {{data.nbLegeres}}
+
Blessures graves : {{data.nbGraves}}
+
Blessure critique : {{data.nbCritiques}}
-
+
+ +
- {{!-- Sheet Tab Navigation --}} - + {{!-- Sheet Tab Navigation --}} + - {{!-- Sheet Body --}} -
+ {{!-- Sheet Body --}} +
- {{!-- Carac Tab --}} -
-
-
-
    - {{#each data.carac as |carac key|}} -
  1. - {{#if carac.isTaille}} - {{carac.label}} - {{else}} - {{carac.label}} - {{/if}} - -
  2. - {{/each}} -
  3. - Total Caractéristiques - {{data.caracSum}} -
  4. -
-
-
-
    - {{#each data.attributs as |attr key|}} -
  1. - {{attr.label}} : - -
  2. - {{/each}} -
  3. - Vie : - / - -
  4. -
  5. - Endurance : - / - -
  6. -
  7. - Sonné : - -
  8. -
  9. - Etat Général : {{data.compteurs.etat.value}} -
  10. -
-
-
-
- - {{!-- Compétences Tab --}} -
-
-
-
    - {{#each data.competencecreature as |comp key|}} -
  1. - - {{comp.name}} - - - -
    - - -
    -
  2. - {{/each}} -
- -
- -
- - {{!-- Combat Tab --}} -
-
- Armes - Niveau - XP -
-
    - {{#each data.armes as |arme key|}} -
  1. - {{arme.name}} - {{arme.data.competence}} - {{numberFormat arme.data.niveau decimals=0 sign=true}} - {{numberFormat arme.data.dommages decimals=0 sign=true}} -
  2. + {{!-- Carac Tab --}} +
    +
    +
    +
      + {{#each data.carac as |carac key|}} +
    1. + {{#if carac.isTaille}} + {{carac.label}} + {{else}} + {{carac.label}} + {{/if}} + +
    2. {{/each}} -
    +
  3. + Total Caractéristiques + {{data.caracSum}} +
  4. +
+
+
    + {{#each data.attributs as |attr key|}} +
  1. + {{attr.label}} : + +
  2. + {{/each}} +
  3. + Vie : + / + +
  4. +
  5. + Endurance : + / + +
  6. +
  7. + Sonné : + +
  8. +
  9. + Etat Général : + {{data.compteurs.etat.value}} +
  10. +
+
+
+ - {{!-- blessures Tab --}} -
- Blessures Légeres : -
- {{#each data.blessures.legeres.liste as |bless key|}} -
  • - {{#if bless.active}}{{else}}{{/if}} - Premiers soins - - Soins complets - - Jours - - Loc. + {{!-- Compétences Tab --}} +
    +
    +
    +
      + {{#each data.competencecreature as |comp key|}} +
    1. + + {{comp.name}} + + + +
      + + +
    2. {{/each}} -
    - Blessures Graves : -
    - {{#each data.blessures.graves.liste as |bless key|}} -
  • - {{#if bless.active}}{{else}}{{/if}} - Premiers soins - - Soins complets - - Jours - - Loc. -
  • - {{/each}} -
    - Blessure Critique : -
    - {{#each data.blessures.critiques.liste as |bless key|}} -
  • - {{#if bless.active}}{{else}}{{/if}} - Premiers soins - - Soins complets - - Jours - - Loc. -
  • - - {{/each}} -
    +
    - - {{!-- Biography Tab --}} -
    -
    -
    -
      -
    1. Sexe :
    2. -
    3. Poids :
    4. -
    5. Taille :
    6. -
    7. Cheveux :
    8. -
    9. Yeux :
    10. -
    -
    -
    -
      -
    1. Age :
    2. -
    3. Heure de naissance :
    4. -
    5. Beauté :
    6. -
    7. Main directrice :
    8. -
    - -
    -
    -
    - {{editor content="data.biographie" target="data.biographie" button=true owner=owner editable=editable}} -
    +
    + + + {{!-- blessures Tab --}} +
    + Blessures Légeres : +
    + {{#each data.blessures.legeres.liste as |bless key|}} +
  • + {{#if bless.active}}{{else}}{{/if}} + Premiers soins - + Soins complets - + Jours + - + Loc. +
  • + {{/each}}
    + Blessures Graves : +
    + {{#each data.blessures.graves.liste as |bless key|}} +
  • + {{#if bless.active}}{{else}}{{/if}} + Premiers soins - + Soins complets - + Jours + - + Loc. +
  • + {{/each}} +
    + Blessure Critique : +
    + {{#each data.blessures.critiques.liste as |bless key|}} +
  • + {{#if bless.active}}{{else}}{{/if}} + Premiers soins - + Soins complets - + Jours + - + Loc. +
  • + + {{/each}} +
    +
    + + {{!-- Biography Tab --}} +
    +
    + {{editor content="data.description" target="data.description" button=true owner=owner editable=editable}} +
    +
    + + -
    - - +
    + \ No newline at end of file