From 6b1ecb63530832c350456b46de1f76a4fb883b88 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 29 Feb 2024 22:35:12 +0100 Subject: [PATCH] Amelioration fiche items --- modules/actors/tedeum-actor-sheet.js | 2 +- modules/actors/tedeum-actor.js | 18 ++- modules/common/tedeum-config.js | 152 +++++++++--------- modules/common/tedeum-utility.js | 43 +++++ modules/data/tedeum-schema-arme.js | 7 +- modules/data/tedeum-schema-armure.js | 7 +- modules/data/tedeum-schema-competence.js | 1 + modules/data/tedeum-schema-debouche.js | 12 -- modules/data/tedeum-schema-education.js | 38 +++++ modules/data/tedeum-schema-equipement.js | 5 + modules/items/tedeum-item-sheet.js | 7 +- modules/items/tedeum-item.js | 2 + modules/tedeum-main.js | 23 +-- packs/equipment/000032.log | 0 packs/equipment/CURRENT | 2 +- packs/equipment/LOG | 14 +- packs/equipment/LOG.old | 14 +- packs/equipment/MANIFEST-000030 | Bin 65 -> 0 bytes postcss/tedeum.css | 99 +++++++----- styles/tedeum.css | 99 +++++++----- system.json | 14 +- template.json | 2 +- templates/items/item-arme-sheet.hbs | 47 +++++- templates/items/item-elementbio-sheet.hbs | 27 ---- templates/items/item-equipment-sheet.hbs | 25 --- templates/items/item-impact-sheet.hbs | 48 ------ templates/items/item-maneuver-sheet.hbs | 27 ---- templates/items/item-specialization-sheet.hbs | 43 ----- templates/items/item-trait-sheet.hbs | 48 ------ templates/items/partial-item-equipment.hbs | 18 --- 30 files changed, 389 insertions(+), 455 deletions(-) delete mode 100644 modules/data/tedeum-schema-debouche.js delete mode 100644 packs/equipment/000032.log delete mode 100644 packs/equipment/MANIFEST-000030 delete mode 100644 templates/items/item-elementbio-sheet.hbs delete mode 100644 templates/items/item-equipment-sheet.hbs delete mode 100644 templates/items/item-impact-sheet.hbs delete mode 100644 templates/items/item-maneuver-sheet.hbs delete mode 100644 templates/items/item-specialization-sheet.hbs delete mode 100644 templates/items/item-trait-sheet.hbs delete mode 100644 templates/items/partial-item-equipment.hbs diff --git a/modules/actors/tedeum-actor-sheet.js b/modules/actors/tedeum-actor-sheet.js index 0d076bf..8eb5c99 100644 --- a/modules/actors/tedeum-actor-sheet.js +++ b/modules/actors/tedeum-actor-sheet.js @@ -12,7 +12,7 @@ export class TeDeumActorPJSheet extends ActorSheet { static get defaultOptions() { return mergeObject(super.defaultOptions, { - classes: ["fvtt-tedeum", "sheet", "actor"], + classes: ["fvtt-te-deum", "sheet", "actor"], template: "systems/fvtt-te-deum/templates/actors/actor-sheet.hbs", width: 860, height:680, diff --git a/modules/actors/tedeum-actor.js b/modules/actors/tedeum-actor.js index 20bdd3b..3872c9f 100644 --- a/modules/actors/tedeum-actor.js +++ b/modules/actors/tedeum-actor.js @@ -65,6 +65,17 @@ export class TeDeumActor extends Actor { } /* -------------------------------------------- */ + getBonusDegats() { + return game.system.tedeum.config.BONUS_DEGATS[this.system.caracteristiques.puissance.value] + } + /* -------------------------------------------- */ + getNbArmures() { + return game.system.tedeum.config.MAX_ARMURES_LOURDES[this.system.caracteristiques.puissance.value] + } + getNbActions() { + return game.system.tedeum.config.ACTIONS_PAR_TOUR[this.system.caracteristiques.adresse.value] + } + /* -------------------------------------------- */ getCompetences() { let comp = duplicate(this.items.filter(item => item.type == 'competence') || []) @@ -118,11 +129,6 @@ export class TeDeumActor extends Actor { } } - /* ------------------------------------------- */ - getEquipments() { - return this.items.filter(item => item.type == 'equipment') - } - /* ------------------------------------------- */ async buildContainerTree() { let equipments = duplicate(this.items.filter(item => item.type == "equipment") || []) @@ -179,6 +185,7 @@ export class TeDeumActor extends Actor { clearInitiative() { this.getFlag("world", "initiative", -1) } + /* -------------------------------------------- */ getInitiativeScore(combatId, combatantId) { let init = Math.floor((this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) @@ -238,7 +245,6 @@ export class TeDeumActor extends Actor { /* -------------------------------------------- */ getCommonRollData() { - //this.system.internals.confrontbonus = 5 // TO BE REMOVED!!!! let rollData = TeDeumUtility.getBasicRollData() rollData.alias = this.name rollData.actorImg = this.img diff --git a/modules/common/tedeum-config.js b/modules/common/tedeum-config.js index eff3a82..367a65c 100644 --- a/modules/common/tedeum-config.js +++ b/modules/common/tedeum-config.js @@ -1,39 +1,39 @@ export const SYSTEM_ID = "fvtt-te-deum"; -export const __BONUS_DEGATS = [{}, { label: "1d4", value: -2 }, { label: "1d6", value: -1 }, { label: "1d8", value: 0 }, -{ label: "1d10", value: 1 }, { label: "1d12", value: 2 }, { label: "1d20", value: 3 }] -export const __MAX_ARMURES_LOURDES = [{}, { value: 1 }, { value: 3 }, { value: 5 }, -{ value: 7 }, { value: 9 }, { value: 11 }] -export const __EFFORT = [{}, { value: 1 }, { value: 2 }, { value: 3 }, - { value: 4 }, { value: 5 }, { value: 6 }] -export const __ACTIONS_PAR_TOUR = [{}, { value: 1 }, { value: 2 }, { value: 2 }, - { value: 3 }, { value: 3 }, { value: 4 }] -export const __COUT_XP = [{}, { value: 10 }, { value: 10 }, { value: 10 }, - { value: 10 }, { value: 30 }, { value: 50 }] - -export const LOCALISATION = { - "pieddroit": { label: "Pied Droit", value: 1, id: "pieddroit", nbArmure: 1 }, - "jambedroite": { label: "Jambe Droite", value: 1, id: "jambedroite", nbArmure: 1 }, - "jambegauche": { label: "Jambe Gauche", value: 1, id: "jambegauche", nbArmure: 1 }, - "piedgauche": { label: "Pied Gauche", value: 1, id: "piedgauche", nbArmure: 1 }, - "piedgauche": { label: "Pied Gauche", value: 1, id: "piedgauche", nbArmure: 1 }, - "maindroite": { label: "Main Droite", value: 1, id: "maindroite", nbArmure: 1 }, - "maingauche": { label: "Main Gauche", value: 1, id: "maingauche", nbArmure: 1 }, - "brasdroit": { label: "Bras Droit", value: 1, id: "brasdroit", nbArmure: 2 }, - "brasgauche": { label: "Bras Gauche", value: 1, id: "brasgauche", nbArmure: 2 }, - "corps": { label: "Corps", value: 1, id: "corps", nbArmure: 2 }, - "tete": { label: "Tête", value: 1, id: "tete", nbArmure: 2 }, -} - -export const ARME_SPECIFICITE = { - "encombrante": { label: "Encombrante", id: "encombrante" }, - "maintiendistance": { label: "Maintien à distance", id: "maintiendistance" }, - "treslongue": { label: "Très longue", id: "treslongue" }, - "coupassomant": { label: "Coup assomant", id: "coupassomant" }, - "peutlancer": { label: "Peut être lancée", id: "peutlancer" }, -} export const TEDEUM_CONFIG = { + + BONUS_DEGATS: [{}, { label: "1d4", value: -2 }, { label: "1d6", value: -1 }, { label: "1d8", value: 0 }, + { label: "1d10", value: 1 }, { label: "1d12", value: 2 }, { label: "1d20", value: 3 }], + MAX_ARMURES_LOURDES: [{}, { value: 1 }, { value: 3 }, { value: 5 }, + { value: 7 }, { value: 9 }, { value: 11 }], + ACTIONS_PAR_TOUR: [{}, { value: 1 }, { value: 2 }, { value: 2 }, + { value: 3 }, { value: 3 }, { value: 4 }], + COUT_XP: [{}, { value: 10 }, { value: 10 }, { value: 10 }, + { value: 10 }, { value: 30 }, { value: 50 }], + + LOCALISATION: { + "pieddroit": { label: "Pied Droit", value: 1, id: "pieddroit", nbArmure: 1 }, + "jambedroite": { label: "Jambe Droite", value: 1, id: "jambedroite", nbArmure: 1 }, + "jambegauche": { label: "Jambe Gauche", value: 1, id: "jambegauche", nbArmure: 1 }, + "piedgauche": { label: "Pied Gauche", value: 1, id: "piedgauche", nbArmure: 1 }, + "piedgauche": { label: "Pied Gauche", value: 1, id: "piedgauche", nbArmure: 1 }, + "maindroite": { label: "Main Droite", value: 1, id: "maindroite", nbArmure: 1 }, + "maingauche": { label: "Main Gauche", value: 1, id: "maingauche", nbArmure: 1 }, + "brasdroit": { label: "Bras Droit", value: 1, id: "brasdroit", nbArmure: 2 }, + "brasgauche": { label: "Bras Gauche", value: 1, id: "brasgauche", nbArmure: 2 }, + "corps": { label: "Corps", value: 1, id: "corps", nbArmure: 2 }, + "tete": { label: "Tête", value: 1, id: "tete", nbArmure: 2 }, + }, + + ARME_SPECIFICITE: { + "encombrante": { label: "Encombrante", id: "encombrante" }, + "maintiendistance": { label: "Maintien à distance", id: "maintiendistance" }, + "treslongue": { label: "Très longue", id: "treslongue" }, + "coupassomant": { label: "Coup assomant", id: "coupassomant" }, + "peutlancer": { label: "Peut être lancée", id: "peutlancer" }, + }, + descriptionValeur: { 1: { qualite: "Mauvais", dice: "d4", negativeDice: "d20", savoir: "Sot", sensibilite: "Obtus", entregent: "Rustaud", puissance: "Menu", complexion: "Anémique", adresse: "Empesé" }, 2: { qualite: "Médiocre", dice: "d6", negativeDice: "d12", savoir: "Limité", sensibilite: "Etriqué", entregent: "Frustre", puissance: "Délicat", complexion: "Languide", adresse: "Gauche" }, @@ -48,50 +48,38 @@ export const TEDEUM_CONFIG = { 11: { qualite: "Excellent", dice: "d12", negativeDice: "d6", savoir: "Docte", sensibilite: "Subtil", entregent: "Galant", puissance: "Musculeux", complexion: "Sanguin", adresse: "Preste" }, 12: { qualite: "Admirabme", dice: "d20", negativeDice: "d4", savoir: "Humaniste", sensibilite: "Spirituel", entregent: "Sémillant", puissance: "Hercule", complexion: "Aguerri", adresse: "Alerte" }, }, + + degatsArmure : { + sansarmure : { label: "Sans armure"}, + cuir : { label: "Cuir"}, + plates : { label: "Plates"}, + mailles : { label: "Mailles"}, + }, + caracteristiques: { - savoir: { id: "savoir", value: 1, label: "Savoir" }, - sensibilite: { id: "sensibilite", value: 1, label: "Sensibilité" }, - entregent: { id: "entregent", value: 1, label: "Entregent" }, - complexion: { id: "complexion", value: 1, label: "Complexion" }, - puissance: { id: "puissance", value: 1, label: "Puissance" }, - adresse: { id: "adresse", value: 1, label: "Adresse" }, + savoir: { id: "savoir", value: "savoir", label: "Savoir" }, + sensibilite: { id: "sensibilite", value: "sensibilite", label: "Sensibilité" }, + entregent: { id: "entregent", value: "entregent", label: "Entregent" }, + complexion: { id: "complexion", value: "complexion", label: "Complexion" }, + puissance: { id: "puissance", value: "puissance", label: "Puissance" }, + adresse: { id: "adresse", value: "adresse", label: "Adresse" }, }, + providence: [ - {labelM: "Brebis égarée", labelF: "Brebis égarée",value: 0, diceValue: "0"}, - {labelM: "Pauvre pêcheur", labelF: "Pauvre pêcheresse",value: 1, diceValue: "d4"}, - {labelM: "Fils prodigue", labelF: "Fille prodigue",value: 2, diceValue: "d6"}, - {labelM: "Bon samaritain", labelF: "Bon samaritain",value: 3, diceValue: "d8"}, - {labelM: "Animé par la grâce", labelF: "Animée par la grâce",value: 4, diceValue: "d10"}, - {labelM: "Oint du Seigneur", labelF: "Ointe du Seigneur",value: 5, diceValue: "d12"}, - {labelM: "Dans la main de Dieu", labelF: "Dans la main de Dieu",value: 6, diceValue: "d20"}, + { labelM: "Brebis égarée", labelF: "Brebis égarée", value: 0, diceValue: "0" }, + { labelM: "Pauvre pêcheur", labelF: "Pauvre pêcheresse", value: 1, diceValue: "d4" }, + { labelM: "Fils prodigue", labelF: "Fille prodigue", value: 2, diceValue: "d6" }, + { labelM: "Bon samaritain", labelF: "Bon samaritain", value: 3, diceValue: "d8" }, + { labelM: "Animé par la grâce", labelF: "Animée par la grâce", value: 4, diceValue: "d10" }, + { labelM: "Oint du Seigneur", labelF: "Ointe du Seigneur", value: 5, diceValue: "d12" }, + { labelM: "Dans la main de Dieu", labelF: "Dans la main de Dieu", value: 6, diceValue: "d20" }, ], - localisation: { - 1: LOCALISATION.pieddroit, - 2: LOCALISATION.piedgauche, - 3: LOCALISATION.jambedroite, - 4: LOCALISATION.jambedroite, - 5: LOCALISATION.jambegauche, - 6: LOCALISATION.jambegauche, - 7: LOCALISATION.maindroite, - 8: LOCALISATION.maingauche, - 9: LOCALISATION.brasdroit, - 10: LOCALISATION.brasdroit, - 11: LOCALISATION.brasgauche, - 12: LOCALISATION.brasgauche, - 13: LOCALISATION.corps, - 14: LOCALISATION.corps, - 15: LOCALISATION.corps, - 16: LOCALISATION.corps, - 17: LOCALISATION.corps, - 18: LOCALISATION.tete, - 19: LOCALISATION.tete, - 20: LOCALISATION.tete - }, + armeTypes: { - "melee": { label: "Mêlée", value: "melee" }, - "tir": { label: "Tir", value: "tir" } + melee: { label: "Mêlée", value: "melee" }, + tir: { label: "Tir", value: "tir" } }, - difficulte: { + difficulte: { routine: { label: "Routine", value: 3 }, facile: { label: "Facile", value: 5 }, pardefaut: { label: "Par Défaut", value: 7 }, @@ -101,8 +89,26 @@ export const TEDEUM_CONFIG = { desespere: { label: "Désespéré", value: 15 } }, monnaie: { - denier: { label: "Deniers", value: 1 }, - sol: { label: "Sols", value: 10 }, - livre: { label: "Livres", value: 100 } + denier: { label: "Deniers", id: "denier", value: 1 }, + sol: { label: "Sols", id: "sol", value: 10 }, + livre: { label: "Livres", id: "livre", value: 100 } + }, + etapesEducation: { + pouponniere: { label: "La Pouponnière", value: "pouponniere", agemin: 0, agemax: 6, nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasMultiplier: false }, + petitsgrimauds: { label: "La classe des Petits Grimauds", value: "petitsgrimauds", agemin: 7, agemax: 12,nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasMultiplier: false }, + rosevie: { label: "Les Roses de la Vie", value: "rosevie", agemin: 13, agemax: 16, nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasMultiplier: false }, + ageviril: { label: "L'Age Viril", value: "ageviril", agemin: 17, agemax: 17, nbCompetences: 9, nbCaracteristiques: 2, hasQuestionnaire: false, hasMultiplier: true }, + }, + origineSociale: { + noblesseepee: { label: "Noblesse d'épée", id: "noblesseepee", value: 1 }, + noblessecloche: { label: "Noblesse de cloche", id: "noblessecloche", value: 2 }, + hautenoblesse: { label: "Haute noblesse (Illégitime)", id: "hautenoblesse", value: 3 }, + hautebourgeoisie: { label: "Haute bourgeoisie", id: "hautebourgeoisie", value: 4 }, + petitebourgeoisie: { label: "Petite bourgeoisie (Marchands)", id: "petitebourgeoisie", value: 5 }, + artisan: { label: "Artisans", id: "artisan", value: 6 }, + laboureur: { label: "Laboureurs", id: "laboureur", value: 7 }, + domesticite: { label: "Domesticité", id: "domesticite", value: 8 }, + paysannerie: { label: "Paysannerie", id: "paysannerie", value: 9 }, + gueux: { label: "Gueux", id: "gueux", value: 10 }, } } \ No newline at end of file diff --git a/modules/common/tedeum-utility.js b/modules/common/tedeum-utility.js index e2b0933..8c276c1 100644 --- a/modules/common/tedeum-utility.js +++ b/modules/common/tedeum-utility.js @@ -46,10 +46,53 @@ export class TeDeumUtility { accum += block.fn(i); return accum; }) + Handlebars.registerHelper('getConfigLabel', function (configName, key) { + //console.log("getConfigLabel", configName, key) + return game.system.tedeum.config[configName][key].label + }) + Handlebars.registerHelper('getConfigLabelWithGender', function (configName, key, genderKey) { + return game.system.tedeum.config[configName][key]["label"+genderKey] + }) Handlebars.registerHelper('isGM', function () { return game.user.isGM }) + // Load compendium data + const competences = await TeDeumUtility.loadCompendium("fvtt-te-deum.competences") + this.competences = competences.map(i => i.toObject()) + this.competencesList = {} + for (let i of this.competences) { + this.competencesList[i.name.toLowerCase()] = {name:i.name, id: i._id} + } + } + + /*-------------------------------------------- */ + static getCompetences() { + return this.competences + } + /*-------------------------------------------- */ + static getCompetencesForDropDown() { + return this.competencesList + } + + /*-------------------------------------------- */ + static prepareEducationContent(formData) { + let nbCompetences = game.system.tedeum.config.etapesEducation[formData.system.etape].nbCompetences + for (let key in formData.system.competences) { + formData.system.competences[key].valid = false + } + for (let i = 1; i <= nbCompetences; i++) { + formData.system.competences[`comp${i}`].valid = true + } + let nbCaracteristiques = game.system.tedeum.config.etapesEducation[formData.system.etape].nbCaracteristiques + for (let key in formData.system.caracteristiques) { + formData.system.caracteristiques[key].valid = false + } + for (let i = 1; i <= nbCaracteristiques; i++) { + formData.system.caracteristiques[`carac${i}`].valid = true + } + formData.hasQuestionnaire = game.system.tedeum.config.etapesEducation[formData.system.etape].hasQuestionnaire; + formData.hasMultiplier = game.system.tedeum.config.etapesEducation[formData.system.etape].hasMultiplier; } /*-------------------------------------------- */ diff --git a/modules/data/tedeum-schema-arme.js b/modules/data/tedeum-schema-arme.js index 1414053..aa6824a 100644 --- a/modules/data/tedeum-schema-arme.js +++ b/modules/data/tedeum-schema-arme.js @@ -2,12 +2,13 @@ export class TeDeumArmeSchema extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields; const requiredInteger = { required: true, nullable: false, integer: true }; + const requiredDouble = { required: true, nullable: false, integer: false }; const schema = {}; schema.typeArme = new fields.StringField({required: true, choices: ["melee", "tir"], initial: "melee"}); schema.specificites = new fields.SchemaField( - Object.values((game.system.tedeum.ARME_SPECIFICITE)).reduce((obj, spec) => { + Object.values((game.system.tedeum.config.ARME_SPECIFICITE)).reduce((obj, spec) => { obj[spec.id] = new fields.SchemaField({ hasSpec: new fields.BooleanField({initial: false}), }); @@ -25,6 +26,10 @@ export class TeDeumArmeSchema extends foundry.abstract.TypeDataModel { schema.initiativeBonus = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }); schema.degats = new fields.StringField({ required: false, blank: true, initial: undefined }); + + schema.prix = new fields.NumberField({ ...requiredDouble, initial: 0, min: 0 }); + schema.monnaie = new fields.StringField({ required: true, blank: false, initial: "denier" }); + schema.description = new fields.HTMLField({ required: true, blank: true }); return schema; diff --git a/modules/data/tedeum-schema-armure.js b/modules/data/tedeum-schema-armure.js index 80e8ae0..93e09d4 100644 --- a/modules/data/tedeum-schema-armure.js +++ b/modules/data/tedeum-schema-armure.js @@ -2,10 +2,12 @@ export class TeDeumArmureSchema extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields; const requiredInteger = { required: true, nullable: false, integer: true }; + const requiredDouble = { required: true, nullable: false, integer: false }; + const schema = {}; schema.localisation = new fields.SchemaField( - Object.values(LOCALISATION).reduce((obj, loc) => { + Object.values(game.system.tedeum.config.LOCALISATION).reduce((obj, loc) => { obj[loc.id] = new fields.SchemaField({ protege: new fields.BooleanField({initial: false}), }); @@ -15,6 +17,9 @@ export class TeDeumArmureSchema extends foundry.abstract.TypeDataModel { schema.protection = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }); + schema.prix = new fields.NumberField({ ...requiredDouble, initial: 0, min: 0 }); + schema.monnaie = new fields.StringField({ required: true, blank: false, initial: "denier" }); + schema.description = new fields.HTMLField({ required: true, blank: true }); return schema; diff --git a/modules/data/tedeum-schema-competence.js b/modules/data/tedeum-schema-competence.js index 75c0a61..09d10b4 100644 --- a/modules/data/tedeum-schema-competence.js +++ b/modules/data/tedeum-schema-competence.js @@ -5,6 +5,7 @@ export class TeDeumCompetenceSchema extends foundry.abstract.TypeDataModel { const schema = {}; schema.caracteristique = new fields.StringField({ required: true, blank: false, initial: "puissance" }); + schema.isBase = new fields.BooleanField({ initial: false }); schema.score = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }); schema.scoreBase = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }); schema.description = new fields.HTMLField({ required: true, blank: true }); diff --git a/modules/data/tedeum-schema-debouche.js b/modules/data/tedeum-schema-debouche.js deleted file mode 100644 index f19e601..0000000 --- a/modules/data/tedeum-schema-debouche.js +++ /dev/null @@ -1,12 +0,0 @@ -export class TeDeumDeboucheSchema extends foundry.abstract.TypeDataModel { - static defineSchema() { - const fields = foundry.data.fields; - const requiredInteger = { required: true, nullable: false, integer: true }; - const schema = {}; - - schema.cagnotteMultiplier = new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 }); - schema.description = new fields.HTMLField({ required: true, blank: true }); - - return schema; - } -} diff --git a/modules/data/tedeum-schema-education.js b/modules/data/tedeum-schema-education.js index 3c7702f..d176b72 100644 --- a/modules/data/tedeum-schema-education.js +++ b/modules/data/tedeum-schema-education.js @@ -2,8 +2,46 @@ export class TeDeumEducationSchema extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields; const requiredInteger = { required: true, nullable: false, integer: true }; + const requiredDouble = { required: true, nullable: false, integer: false }; const schema = {}; + schema.etape = new fields.StringField({required: true, initial: "pouponniere"}); + schema.accessible = new fields.SchemaField( + Object.values((game.system.tedeum.config.origineSociale)).reduce((obj, spec) => { + obj[spec.id] = new fields.SchemaField({ + isaccessible: new fields.BooleanField({initial: false}), + }); + return obj; + }, {}) + ); + schema.caracteristiques = new fields.SchemaField(Array.fromRange(3, 1).reduce((caracs, i) => { + caracs[`carac${i}`] = new fields.SchemaField({ + caracId: new fields.StringField({ required: true, blank: false, initial: "entregent" }) + }); + return caracs; + }, {})); + schema.competences = new fields.SchemaField(Array.fromRange(9, 1).reduce((comps, i) => { + comps[`comp${i}`] = new fields.SchemaField({ + compName: new fields.StringField({ required: true, blank: true, initial: "" }) + }); + return comps; + }, {})); + schema.questionnaire = new fields.SchemaField(Array.fromRange(4, 1).reduce((questions, i) => { + questions[`question${i}`] = new fields.SchemaField({ + question: new fields.StringField({ required: true, blank: true, initial: "" }), + reponses: new fields.SchemaField( Array.fromRange(6, 1).reduce((resp, i) => { + resp[`reponse${i}`] = new fields.SchemaField({ + num: new fields.NumberField({ ...requiredInteger, initial: i, min:i }), + reponse: new fields.StringField({ required: true, blank: true, initial: "" }), + compName: new fields.StringField({ required: true, blank: true, initial: "" }) + }); + return resp; + }, {})) + }); + return questions; + }, {})); + schema.cagnotteMultiplier = new fields.NumberField({ ...requiredDouble, initial: 1.0, min: 0 }); + schema.description = new fields.HTMLField({ required: true, blank: true }); return schema; diff --git a/modules/data/tedeum-schema-equipement.js b/modules/data/tedeum-schema-equipement.js index 4a8352c..f1a107e 100644 --- a/modules/data/tedeum-schema-equipement.js +++ b/modules/data/tedeum-schema-equipement.js @@ -2,8 +2,13 @@ export class TeDeumEquipementSchema extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields; const requiredInteger = { required: true, nullable: false, integer: true }; + const requiredDouble = { required: true, nullable: false, integer: false }; + const schema = {}; + schema.prix = new fields.NumberField({ ...requiredDouble, initial: 0, min: 0 }); + schema.monnaie = new fields.StringField({ required: true, blank: false, initial: "denier" }); + schema.description = new fields.HTMLField({ required: true, blank: true }); return schema; diff --git a/modules/items/tedeum-item-sheet.js b/modules/items/tedeum-item-sheet.js index 5bb1425..3049333 100644 --- a/modules/items/tedeum-item-sheet.js +++ b/modules/items/tedeum-item-sheet.js @@ -9,7 +9,7 @@ export class TeDeumItemSheet extends ItemSheet { /** @override */ static get defaultOptions() { return mergeObject(super.defaultOptions, { - classes: ["fvtt-tedeum", "sheet", "item"], + classes: ["fvtt-te-deum", "sheet", "item"], template: "systems/fvtt-te-deum/templates/item-sheet.hbs", dragDrop: [{ dragSelector: null, dropSelector: null }], width: 620, @@ -45,6 +45,7 @@ export class TeDeumItemSheet extends ItemSheet { cssClass: this.isEditable ? "editable" : "locked", system: duplicate(this.object.system), config: duplicate(game.system.tedeum.config), + competences: TeDeumUtility.getCompetencesForDropDown(), limited: this.object.limited, options: this.options, owner: this.document.isOwner, @@ -52,6 +53,10 @@ export class TeDeumItemSheet extends ItemSheet { notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }), isGM: game.user.isGM } + + if (this.object.type == "education") { + TeDeumUtility.prepareEducationContent(formData); + } this.options.editable = !(this.object.origin == "embeddedItem"); console.log("ITEM DATA", formData, this); diff --git a/modules/items/tedeum-item.js b/modules/items/tedeum-item.js index 9653b75..ecb1ffc 100644 --- a/modules/items/tedeum-item.js +++ b/modules/items/tedeum-item.js @@ -2,8 +2,10 @@ import { TeDeumUtility } from "../common/tedeum-utility.js"; export const defaultItemImg = { arme: "systems/fvtt-te-deum/images/icons/icon_arme.webp", + armure: "systems/fvtt-te-deum/images/icons/icon_armure.webp", equipement: "systems/fvtt-te-deum/images/icons/icon_equipement.webp", competence: "systems/fvtt-te-deum/images/icons/icon_competence.webp", + education: "systems/fvtt-te-deum/images/icons/icon_education.webp", } /** diff --git a/modules/tedeum-main.js b/modules/tedeum-main.js index eb376af..e2ba037 100644 --- a/modules/tedeum-main.js +++ b/modules/tedeum-main.js @@ -18,7 +18,6 @@ import { TeDeumCompetenceSchema } from "./data/tedeum-schema-competence.js"; import { TeDeumEquipementSchema } from "./data/tedeum-schema-equipement.js"; import { TeDeumOrigineSchema } from "./data/tedeum-schema-origine.js"; import { TeDeumEducationSchema } from "./data/tedeum-schema-education.js"; -import { TeDeumDeboucheSchema } from "./data/tedeum-schema-debouche.js"; import { TeDeumItem } from "./items/tedeum-item.js"; import { TeDeumItemSheet } from "./items/tedeum-item-sheet.js"; @@ -27,8 +26,8 @@ import { TeDeumHotbar } from "./app/tedeum-hotbar.js" import { TeDeumCombat } from "./app/tedeum-combat.js"; import { TeDeumUtility } from "./common/tedeum-utility.js"; -import { TEDEUM_CONFIG, LOCALISATION, ARME_SPECIFICITE} from "./common/tedeum-config.js"; -import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"; +import { TEDEUM_CONFIG } from "./common/tedeum-config.js"; + /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ @@ -40,8 +39,6 @@ Hooks.once("init", async function () { game.system.tedeum = { config: TEDEUM_CONFIG, - LOCALISATION: LOCALISATION, - ARME_SPECIFICITE: ARME_SPECIFICITE, TeDeumHotbar } console.log(`Initializing TeDeum RPG 2`); @@ -72,8 +69,7 @@ Hooks.once("init", async function () { equipement: TeDeumEquipementSchema, armure: TeDeumArmureSchema, origine: TeDeumOrigineSchema, - education: TeDeumEducationSchema, - debouche: TeDeumDeboucheSchema, + education: TeDeumEducationSchema }; console.log("TeDeum RPG | Ready"); @@ -83,7 +79,7 @@ Hooks.once("init", async function () { Actors.registerSheet("fvtt-te-deum", TeDeumActorPJSheet, { types: ["pnj"], makeDefault: true }); Items.unregisterSheet("core", ItemSheet); - Items.registerSheet("fvtt-te-deum", TeDeumItemSheet, { types: ["arme"], makeDefault: true }); + Items.registerSheet("fvtt-te-deum", TeDeumItemSheet, { makeDefault: true }); TeDeumUtility.init() }); @@ -113,11 +109,16 @@ Hooks.once("ready", function () { }); } - console.log("YEADEAE"); - ClassCounter.registerUsageCount(); - welcomeMessage(); + import("https://www.uberwald.me/fvtt_appcount/count-class-ready.js").then(moduleCounter=>{ + console.log("ClassCounter loaded", moduleCounter) + moduleCounter.ClassCounter.registerUsageCount() + }).catch(err=> + console.log("No stats available, giving up.") + ) TeDeumUtility.ready(); + welcomeMessage(); + }) diff --git a/packs/equipment/000032.log b/packs/equipment/000032.log deleted file mode 100644 index e69de29..0000000 diff --git a/packs/equipment/CURRENT b/packs/equipment/CURRENT index caa721a..f24fe8e 100644 --- a/packs/equipment/CURRENT +++ b/packs/equipment/CURRENT @@ -1 +1 @@ -MANIFEST-000030 +MANIFEST-000076 diff --git a/packs/equipment/LOG b/packs/equipment/LOG index 05803ad..b9cf3ff 100644 --- a/packs/equipment/LOG +++ b/packs/equipment/LOG @@ -1,7 +1,7 @@ -2024/02/19-21:26:30.030455 7fc68ee006c0 Recovering log #28 -2024/02/19-21:26:30.041661 7fc68ee006c0 Delete type=3 #26 -2024/02/19-21:26:30.042288 7fc68ee006c0 Delete type=0 #28 -2024/02/19-22:02:32.194497 7fc68d0006c0 Level-0 table #33: started -2024/02/19-22:02:32.194586 7fc68d0006c0 Level-0 table #33: 0 bytes OK -2024/02/19-22:02:32.236476 7fc68d0006c0 Delete type=0 #31 -2024/02/19-22:02:32.286376 7fc68d0006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) +2024/02/29-22:27:55.142370 7fd557e006c0 Recovering log #74 +2024/02/29-22:27:55.153628 7fd557e006c0 Delete type=3 #72 +2024/02/29-22:27:55.153680 7fd557e006c0 Delete type=0 #74 +2024/02/29-22:28:38.441598 7fd555a006c0 Level-0 table #79: started +2024/02/29-22:28:38.441626 7fd555a006c0 Level-0 table #79: 0 bytes OK +2024/02/29-22:28:38.447661 7fd555a006c0 Delete type=0 #77 +2024/02/29-22:28:38.454433 7fd555a006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs/equipment/LOG.old b/packs/equipment/LOG.old index 7f69afa..b187cae 100644 --- a/packs/equipment/LOG.old +++ b/packs/equipment/LOG.old @@ -1,7 +1,7 @@ -2024/02/19-21:20:44.806918 7fc68ee006c0 Recovering log #24 -2024/02/19-21:20:44.818366 7fc68ee006c0 Delete type=3 #22 -2024/02/19-21:20:44.818471 7fc68ee006c0 Delete type=0 #24 -2024/02/19-21:26:26.162483 7fc68d0006c0 Level-0 table #29: started -2024/02/19-21:26:26.162535 7fc68d0006c0 Level-0 table #29: 0 bytes OK -2024/02/19-21:26:26.169669 7fc68d0006c0 Delete type=0 #27 -2024/02/19-21:26:26.169948 7fc68d0006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) +2024/02/29-22:04:33.935165 7fd556a006c0 Recovering log #70 +2024/02/29-22:04:33.945327 7fd556a006c0 Delete type=3 #68 +2024/02/29-22:04:33.945415 7fd556a006c0 Delete type=0 #70 +2024/02/29-22:27:52.954004 7fd555a006c0 Level-0 table #75: started +2024/02/29-22:27:52.954056 7fd555a006c0 Level-0 table #75: 0 bytes OK +2024/02/29-22:27:52.990626 7fd555a006c0 Delete type=0 #73 +2024/02/29-22:27:53.023766 7fd555a006c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs/equipment/MANIFEST-000030 b/packs/equipment/MANIFEST-000030 deleted file mode 100644 index cfed94e1d9610aa88d7891ab45eb59b176644e44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$m>V`zJUU7@6cb8JHDV R7>bX2^nthvK&}!C0{{gu6HNdB diff --git a/postcss/tedeum.css b/postcss/tedeum.css index d3571b5..707de6a 100644 --- a/postcss/tedeum.css +++ b/postcss/tedeum.css @@ -52,7 +52,7 @@ .sheet nav.sheet-tabs { font-size: 0.8rem; } /* For nav and title */ -.window-app input, .fvtt-ecryme .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { +.window-app input, .fvtt-te-deum .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { font-size: 0.8rem; } @@ -202,7 +202,7 @@ table {border: 1px solid #7a7971;} } /* Styles limited to sheets */ -.fvtt-ecryme .sheet-header { +.fvtt-te-deum .sheet-header { -webkit-box-flex: 0; -ms-flex: 0 0 210px; flex: 0 0 210px; @@ -222,7 +222,7 @@ table {border: 1px solid #7a7971;} margin-bottom: 10px; } -.fvtt-ecryme .sheet-header .profile-img { +.fvtt-te-deum .sheet-header .profile-img { -webkit-box-flex: 0; -ms-flex: 0 0 128px; flex: 0 0 128px; @@ -271,20 +271,20 @@ table {border: 1px solid #7a7971;} vertical-align: bottom; } -.fvtt-ecryme .sheet-header .header-fields { +.fvtt-te-deum .sheet-header .header-fields { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; } -.fvtt-ecryme .sheet-header h1.charname { +.fvtt-te-deum .sheet-header h1.charname { height: 50px; padding: 0px; margin: 5px 0; border-bottom: 0; } -.fvtt-ecryme .sheet-header h1.charname input { +.fvtt-te-deum .sheet-header h1.charname input { font-family: MailartRubberstamp; font-size: 3rem; width: 100%; @@ -292,7 +292,7 @@ table {border: 1px solid #7a7971;} margin: 0; } -.fvtt-ecryme .sheet-tabs { +.fvtt-te-deum .sheet-tabs { -webkit-box-flex: 0; -ms-flex: 0; flex: 0; @@ -300,9 +300,9 @@ table {border: 1px solid #7a7971;} font-size: 2.2rem; } -.fvtt-ecryme .sheet-body, -.fvtt-ecryme .sheet-body .tab, -.fvtt-ecryme .sheet-body .tab .editor { +.fvtt-te-deum .sheet-body, +.fvtt-te-deum .sheet-body .tab, +.fvtt-te-deum .sheet-body .tab .editor { height: 100%; font-size: 0.8rem; } @@ -325,70 +325,70 @@ table {border: 1px solid #7a7971;} padding: 0 3px; } -.fvtt-ecryme .tox .tox-editor-container { +.fvtt-te-deum .tox .tox-editor-container { background: #fff; } -.fvtt-ecryme .tox .tox-edit-area { +.fvtt-te-deum .tox .tox-edit-area { padding: 0 8px; } -.fvtt-ecryme .resource-label { +.fvtt-te-deum .resource-label { font-weight: bold; text-transform: uppercase; } -.fvtt-ecryme .tabs { +.fvtt-te-deum .tabs { height: 40px; border-top: 1px solid #AAA; border-bottom: 1px solid #AAA; color: #000000; } -.fvtt-ecryme .tabs .item { +.fvtt-te-deum .tabs .item { line-height: 40px; font-weight: bold; } -.fvtt-ecryme .tabs .item.active { +.fvtt-te-deum .tabs .item.active { text-decoration: underline; text-shadow: none; } -.fvtt-ecryme .items-list { +.fvtt-te-deum .items-list { list-style: none; margin: 1px 0; padding: 0; overflow-y: auto; } -.fvtt-ecryme .items-list .item-header { +.fvtt-te-deum .items-list .item-header { font-weight: bold; } -.fvtt-ecryme .items-list .item { +.fvtt-te-deum .items-list .item { height: 30px; line-height: 24px; padding: 1px 0; border-bottom: 1px solid #BBB; } -.fvtt-ecryme .items-list .item .item-image { +.fvtt-te-deum .items-list .item .item-image { -webkit-box-flex: 0; -ms-flex: 0 0 24px; flex: 0 0 24px; margin-right: 5px; } -.fvtt-ecryme .items-list .item img { +.fvtt-te-deum .items-list .item img { display: block; } -.fvtt-ecryme .items-list .item-name { +.fvtt-te-deum .items-list .item-name { margin: 0; } -.fvtt-ecryme .items-list .item-controls { +.fvtt-te-deum .items-list .item-controls { -webkit-box-flex: 0; -ms-flex: 0 0 86px; flex: 0 0 86px; @@ -403,7 +403,8 @@ li.folder > .folder-header h3 { /* Sheet */ .window-app.sheet .window-content .sheet-header{ color: rgba(19, 18, 18, 0.95); - background: url("../images/ui/fond_carnet_01.webp"); + /*background: url("../images/ui/frise_topleft_01.webp");*/ + background: rgba(226, 226, 222, 0.95); /*background: #494e6b;*/ } @@ -425,15 +426,8 @@ select { .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] { color: rgba(19, 18, 18, 0.95); - background: url("../images/ui/fond_carnet_01.webp"); - border: 1 none; - margin-bottom: 0.25rem; - margin-left: 2px; -} - -.window-app.sheet .window-content .sheet-body input[type="password"], .window-app.sheet .window-content .sheet-body input[type="date"], .window-app.sheet .window-content .sheet-body input[type="time"] { - color: rgba(19, 18, 18, 0.95); - background: url("../images/ui/fond_carnet_01.webp"); + /*background: url("../images/ui/frise_topleft_01.webp");*/ + background: rgba(226, 226, 222, 0.95); border: 1 none; margin-bottom: 0.25rem; margin-left: 2px; @@ -450,7 +444,8 @@ select { .window-app .window-content, .window-app.sheet .window-content .sheet-body{ font-size: 0.8rem; /*background: url("../images/ui/pc_sheet_bg.webp") repeat left top;*/ - background: url("../images/ui/fond_carnet_01.webp"); + /*background: url("../images/ui/frise_topleft_01.webp");*/ + background: rgba(226, 226, 222, 0.95); color: rgba(19, 18, 18, 0.95); } @@ -477,14 +472,20 @@ section.sheet-body{padding: 0.25rem 0.5rem;} line-height: 1.5rem; border-top: 0 none; border-bottom: 0 none; - background-color:#252525; - color:beige; + background: linear-gradient(rgba(226, 226, 222, 0.5), rgba(226, 226, 222, 0.5)), url("../images/ui/frise_bottom_01.webp"); + background-repeat: no-repeat; + background-size: 100% 100%; + z-index: 1; + /*background-color:#252525;*/ } /* background: rgb(245,245,240) url("../images/ui/fond4.webp") repeat left top;*/ nav.sheet-tabs .item { + z-index: 2; position: relative; + opacity: 1.0; + color:rgba(29, 28, 31); padding: 0 0.25rem; } @@ -799,7 +800,7 @@ ul, li { background-color:#f5f5f5; background-position: 0px 35px; background-repeat: no-repeat; - background-image: url("../images/ui/fond_carnet_01.webp"); + background: rgba(226, 226, 222, 0.95); color: rgba(19, 18, 18, 0.95); } @@ -1155,7 +1156,7 @@ ul, li { color: #CCC } #pause > img { - content: url(../images/ui/ecryme_logo_small_01.webp); + content: url(../images/ui/te-deum_logo_small_01.webp); height: 200px; width: 200px; top: -200px; @@ -1163,7 +1164,7 @@ ul, li { } #logo { - content : url(../images/ui/ecryme_logo_small_01.webp); + content : url(../images/ui/te-deum_logo_small_01.webp); width: 100px; height: 60px; } @@ -1259,24 +1260,34 @@ ul, li { min-width: 10rem; } .item-name-label-long { - margin-top: 4px; flex-grow:2; max-width: 12rem; min-width: 12rem; } +.item-name-label-long2 { + flex-grow:2; + max-width: 20rem; + min-width: 20rem; +} +.item-name-label-long3 { + flex-grow:2; + max-width: 18rem; + min-width: 18rem; +} .item-name-label-short { flex-grow:1; max-width: 4rem; min-width: 4rem; } .item-name-label-medium { - margin-top: 4px; flex-grow:2; max-width: 6rem; min-width: 6rem; } -.item-name-label-long2 { +.item-name-label-text-margin { margin-top: 4px; +} +.item-name-label-long2 { flex-grow:2; max-width: 22rem; min-width: 22rem; @@ -1339,10 +1350,10 @@ ul, li { text-decoration: underline; } -.ecryme-roll-dialog .window-header { +.te-deum-roll-dialog .window-header { border-radius: 10px 10px 0% 0%; } -.ecryme-roll-dialog .window-content { +.te-deum-roll-dialog .window-content { border-radius: 0% 0% 10px 10px; } diff --git a/styles/tedeum.css b/styles/tedeum.css index b63cfdc..4e16322 100644 --- a/styles/tedeum.css +++ b/styles/tedeum.css @@ -52,7 +52,7 @@ .sheet nav.sheet-tabs { font-size: 0.8rem; } /* For nav and title */ -.window-app input, .fvtt-ecryme .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { +.window-app input, .fvtt-te-deum .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { font-size: 0.8rem; } @@ -189,7 +189,7 @@ table {border: 1px solid #7a7971;} } /* Styles limited to sheets */ -.fvtt-ecryme .sheet-header { +.fvtt-te-deum .sheet-header { flex: 0 0 210px; overflow: hidden; display: flex; @@ -199,7 +199,7 @@ table {border: 1px solid #7a7971;} margin-bottom: 10px; } -.fvtt-ecryme .sheet-header .profile-img { +.fvtt-te-deum .sheet-header .profile-img { flex: 0 0 128px; width: 128px; height: auto; @@ -248,18 +248,18 @@ table {border: 1px solid #7a7971;} vertical-align: bottom; } -.fvtt-ecryme .sheet-header .header-fields { +.fvtt-te-deum .sheet-header .header-fields { flex: 1; } -.fvtt-ecryme .sheet-header h1.charname { +.fvtt-te-deum .sheet-header h1.charname { height: 50px; padding: 0px; margin: 5px 0; border-bottom: 0; } -.fvtt-ecryme .sheet-header h1.charname input { +.fvtt-te-deum .sheet-header h1.charname input { font-family: MailartRubberstamp; font-size: 3rem; width: 100%; @@ -267,15 +267,15 @@ table {border: 1px solid #7a7971;} margin: 0; } -.fvtt-ecryme .sheet-tabs { +.fvtt-te-deum .sheet-tabs { flex: 0; font-family: MailartRubberstamp; font-size: 2.2rem; } -.fvtt-ecryme .sheet-body, -.fvtt-ecryme .sheet-body .tab, -.fvtt-ecryme .sheet-body .tab .editor { +.fvtt-te-deum .sheet-body, +.fvtt-te-deum .sheet-body .tab, +.fvtt-te-deum .sheet-body .tab .editor { height: 100%; font-size: 0.8rem; } @@ -298,68 +298,68 @@ table {border: 1px solid #7a7971;} padding: 0 3px; } -.fvtt-ecryme .tox .tox-editor-container { +.fvtt-te-deum .tox .tox-editor-container { background: #fff; } -.fvtt-ecryme .tox .tox-edit-area { +.fvtt-te-deum .tox .tox-edit-area { padding: 0 8px; } -.fvtt-ecryme .resource-label { +.fvtt-te-deum .resource-label { font-weight: bold; text-transform: uppercase; } -.fvtt-ecryme .tabs { +.fvtt-te-deum .tabs { height: 40px; border-top: 1px solid #AAA; border-bottom: 1px solid #AAA; color: #000000; } -.fvtt-ecryme .tabs .item { +.fvtt-te-deum .tabs .item { line-height: 40px; font-weight: bold; } -.fvtt-ecryme .tabs .item.active { +.fvtt-te-deum .tabs .item.active { text-decoration: underline; text-shadow: none; } -.fvtt-ecryme .items-list { +.fvtt-te-deum .items-list { list-style: none; margin: 1px 0; padding: 0; overflow-y: auto; } -.fvtt-ecryme .items-list .item-header { +.fvtt-te-deum .items-list .item-header { font-weight: bold; } -.fvtt-ecryme .items-list .item { +.fvtt-te-deum .items-list .item { height: 30px; line-height: 24px; padding: 1px 0; border-bottom: 1px solid #BBB; } -.fvtt-ecryme .items-list .item .item-image { +.fvtt-te-deum .items-list .item .item-image { flex: 0 0 24px; margin-right: 5px; } -.fvtt-ecryme .items-list .item img { +.fvtt-te-deum .items-list .item img { display: block; } -.fvtt-ecryme .items-list .item-name { +.fvtt-te-deum .items-list .item-name { margin: 0; } -.fvtt-ecryme .items-list .item-controls { +.fvtt-te-deum .items-list .item-controls { flex: 0 0 86px; text-align: right; } @@ -372,7 +372,8 @@ li.folder > .folder-header h3 { /* Sheet */ .window-app.sheet .window-content .sheet-header{ color: rgba(19, 18, 18, 0.95); - background: url("../images/ui/fond_carnet_01.webp"); + /*background: url("../images/ui/frise_topleft_01.webp");*/ + background: rgba(226, 226, 222, 0.95); /*background: #494e6b;*/ } @@ -394,15 +395,8 @@ select { .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] { color: rgba(19, 18, 18, 0.95); - background: url("../images/ui/fond_carnet_01.webp"); - border: 1 none; - margin-bottom: 0.25rem; - margin-left: 2px; -} - -.window-app.sheet .window-content .sheet-body input[type="password"], .window-app.sheet .window-content .sheet-body input[type="date"], .window-app.sheet .window-content .sheet-body input[type="time"] { - color: rgba(19, 18, 18, 0.95); - background: url("../images/ui/fond_carnet_01.webp"); + /*background: url("../images/ui/frise_topleft_01.webp");*/ + background: rgba(226, 226, 222, 0.95); border: 1 none; margin-bottom: 0.25rem; margin-left: 2px; @@ -419,7 +413,8 @@ select { .window-app .window-content, .window-app.sheet .window-content .sheet-body{ font-size: 0.8rem; /*background: url("../images/ui/pc_sheet_bg.webp") repeat left top;*/ - background: url("../images/ui/fond_carnet_01.webp"); + /*background: url("../images/ui/frise_topleft_01.webp");*/ + background: rgba(226, 226, 222, 0.95); color: rgba(19, 18, 18, 0.95); } @@ -448,14 +443,20 @@ section.sheet-body{padding: 0.25rem 0.5rem;} line-height: 1.5rem; border-top: 0 none; border-bottom: 0 none; - background-color:#252525; - color:beige; + background: linear-gradient(rgba(226, 226, 222, 0.5), rgba(226, 226, 222, 0.5)), url("../images/ui/frise_bottom_01.webp"); + background-repeat: no-repeat; + background-size: 100% 100%; + z-index: 1; + /*background-color:#252525;*/ } /* background: rgb(245,245,240) url("../images/ui/fond4.webp") repeat left top;*/ nav.sheet-tabs .item { + z-index: 2; position: relative; + opacity: 1.0; + color:rgba(29, 28, 31); padding: 0 0.25rem; } @@ -772,7 +773,7 @@ ul, li { background-color:#f5f5f5; background-position: 0px 35px; background-repeat: no-repeat; - background-image: url("../images/ui/fond_carnet_01.webp"); + background: rgba(226, 226, 222, 0.95); color: rgba(19, 18, 18, 0.95); } @@ -1135,7 +1136,7 @@ ul, li { color: #CCC } #pause > img { - content: url(../images/ui/ecryme_logo_small_01.webp); + content: url(../images/ui/te-deum_logo_small_01.webp); height: 200px; width: 200px; top: -200px; @@ -1143,7 +1144,7 @@ ul, li { } #logo { - content : url(../images/ui/ecryme_logo_small_01.webp); + content : url(../images/ui/te-deum_logo_small_01.webp); width: 100px; height: 60px; } @@ -1239,24 +1240,34 @@ ul, li { min-width: 10rem; } .item-name-label-long { - margin-top: 4px; flex-grow:2; max-width: 12rem; min-width: 12rem; } +.item-name-label-long2 { + flex-grow:2; + max-width: 20rem; + min-width: 20rem; +} +.item-name-label-long3 { + flex-grow:2; + max-width: 18rem; + min-width: 18rem; +} .item-name-label-short { flex-grow:1; max-width: 4rem; min-width: 4rem; } .item-name-label-medium { - margin-top: 4px; flex-grow:2; max-width: 6rem; min-width: 6rem; } -.item-name-label-long2 { +.item-name-label-text-margin { margin-top: 4px; +} +.item-name-label-long2 { flex-grow:2; max-width: 22rem; min-width: 22rem; @@ -1319,10 +1330,10 @@ ul, li { text-decoration: underline; } -.ecryme-roll-dialog .window-header { +.te-deum-roll-dialog .window-header { border-radius: 10px 10px 0% 0%; } -.ecryme-roll-dialog .window-content { +.te-deum-roll-dialog .window-content { border-radius: 0% 0% 10px 10px; } diff --git a/system.json b/system.json index d02fc2e..855b726 100644 --- a/system.json +++ b/system.json @@ -31,6 +31,18 @@ "PLAYER": "OBSERVER", "ASSISTANT": "OWNER" } + }, + { + "label": "Compétences", + "type": "Item", + "name": "competences", + "path": "packs/competences", + "system": "fvtt-te-deum", + "flags": {}, + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } } ], "license": "LICENSE.txt", @@ -50,7 +62,7 @@ }, "title": "Te Deum pour Un Massacre, le Jeu de Rôles", "url": "https://www.uberwald.me/gitea/public/fvtt-te-deum", - "version": "11.0.0", + "version": "11.0.1", "download": "https://www.uberwald.me/gitea/public/fvtt-te-deum/archive/fvtt-te-deum-v11.0.0.zip", "background": "" } \ No newline at end of file diff --git a/template.json b/template.json index 13ccdca..89f0b2c 100644 --- a/template.json +++ b/template.json @@ -5,7 +5,7 @@ "pnj": {} }, "Item": { - "types": ["arme", "competence", "armure", "equipement", "origine", "education", "debouche"], + "types": ["arme", "competence", "armure", "equipement", "origine", "education"], "arme": {}, "competence": {}, "armure": {}, diff --git a/templates/items/item-arme-sheet.hbs b/templates/items/item-arme-sheet.hbs index 79fcbf1..4df4cd2 100644 --- a/templates/items/item-arme-sheet.hbs +++ b/templates/items/item-arme-sheet.hbs @@ -1,11 +1,11 @@
- -
-

-
+ +
+

+
- + {{> systems/fvtt-te-deum/templates/items/partial-item-nav.hbs}} @@ -13,7 +13,7 @@
{{> systems/fvtt-te-deum/templates/items/partial-item-description.hbs}} - +
@@ -26,9 +26,40 @@ + {{#each system.specificites as |spec specId|}} +
  • + + +
  • + {{/each}} + + {{#each system.degatsArmure as |degat degtId|}} +
  • + + +
  • + {{/each}} + +
  • + + +
  • + +
  • + + + +
  • + +
    -
    -
    + \ No newline at end of file diff --git a/templates/items/item-elementbio-sheet.hbs b/templates/items/item-elementbio-sheet.hbs deleted file mode 100644 index 8be4ccc..0000000 --- a/templates/items/item-elementbio-sheet.hbs +++ /dev/null @@ -1,27 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} - - - {{!-- Sheet Body --}} -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} - -
    - -
    -
      - -
    -
    -
    - -
    -
    diff --git a/templates/items/item-equipment-sheet.hbs b/templates/items/item-equipment-sheet.hbs deleted file mode 100644 index 799f8e1..0000000 --- a/templates/items/item-equipment-sheet.hbs +++ /dev/null @@ -1,25 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} - - - {{!-- Sheet Body --}} -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} - -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-equipment.hbs}} - -
    - - -
    -
    diff --git a/templates/items/item-impact-sheet.hbs b/templates/items/item-impact-sheet.hbs deleted file mode 100644 index ee0cf14..0000000 --- a/templates/items/item-impact-sheet.hbs +++ /dev/null @@ -1,48 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} - - - {{!-- Sheet Body --}} -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} - -
    - -
    -
      - -
    • - - -
    • - -
    • - - -
    • -
    -
    -
    - -
    -
    diff --git a/templates/items/item-maneuver-sheet.hbs b/templates/items/item-maneuver-sheet.hbs deleted file mode 100644 index 8be4ccc..0000000 --- a/templates/items/item-maneuver-sheet.hbs +++ /dev/null @@ -1,27 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} - - - {{!-- Sheet Body --}} -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} - -
    - -
    -
      - -
    -
    -
    - -
    -
    diff --git a/templates/items/item-specialization-sheet.hbs b/templates/items/item-specialization-sheet.hbs deleted file mode 100644 index 777dda0..0000000 --- a/templates/items/item-specialization-sheet.hbs +++ /dev/null @@ -1,43 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} - - - {{!-- Sheet Body --}} -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} - -
    - -
    -
      - -
    • - - -
    • - -
    • - - -
    • - -
    -
    -
    - -
    -
    diff --git a/templates/items/item-trait-sheet.hbs b/templates/items/item-trait-sheet.hbs deleted file mode 100644 index 83584ba..0000000 --- a/templates/items/item-trait-sheet.hbs +++ /dev/null @@ -1,48 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-nav.hbs}} - - - {{!-- Sheet Body --}} -
    - - {{> systems/fvtt-ecryme/templates/items/partial-item-description.hbs}} - -
    - -
    -
      - -
    • - - -
    • - -
    • - - -
    • -
    -
    -
    - -
    -
    diff --git a/templates/items/partial-item-equipment.hbs b/templates/items/partial-item-equipment.hbs deleted file mode 100644 index 3304e4f..0000000 --- a/templates/items/partial-item-equipment.hbs +++ /dev/null @@ -1,18 +0,0 @@ -
  • - - -
  • - -
  • - - - -
  • -