From e3677e97393dfbab9e941af355eb885407048fac Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Mon, 26 Dec 2022 20:46:03 +0100 Subject: [PATCH] Initial import --- modules/heritiers-commands.js | 2 +- modules/heritiers-config.js | 5 ++ modules/heritiers-item-sheet.js | 1 + modules/heritiers-main.js | 6 +- styles/simple.css | 54 ++++++++++------ template.json | 63 +++--------------- templates/item-competence-sheet.html | 96 ++++++++++++---------------- 7 files changed, 94 insertions(+), 133 deletions(-) diff --git a/modules/heritiers-commands.js b/modules/heritiers-commands.js index 5f41a7f..da9b4ad 100644 --- a/modules/heritiers-commands.js +++ b/modules/heritiers-commands.js @@ -7,7 +7,7 @@ import { HeritiersRollDialog } from "./heritiers-roll-dialog.js"; export class HeritiersCommands { static init() { - if (!game.system.hawkmoon.commands) { + if (!game.system.lesheritiers.commands) { //const HeritiersCommands = new HeritiersCommands() //HeritiersCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => HeritiersCommands.createChar(msg), descr: "Create a new character" }); //game.system.mournblade.commands = HeritiersCommands diff --git a/modules/heritiers-config.js b/modules/heritiers-config.js index b8d57a2..4d9d486 100644 --- a/modules/heritiers-config.js +++ b/modules/heritiers-config.js @@ -2,6 +2,11 @@ export const HERITIERS_CONFIG = { competenceCategorie : { + "utile": "Utile", + "futile": "Futile" + }, + + competenceProfil : { "aventurier": "Aventurier", "roublard": "Roublard", "combattant": "Combattant", diff --git a/modules/heritiers-item-sheet.js b/modules/heritiers-item-sheet.js index 9175495..a11d3e2 100644 --- a/modules/heritiers-item-sheet.js +++ b/modules/heritiers-item-sheet.js @@ -62,6 +62,7 @@ export class HeritiersItemSheet extends ItemSheet { limited: this.object.limited, options: this.options, owner: this.document.isOwner, + config: game.system.lesheritiers.config, description: await TextEditor.enrichHTML(this.object.system.description, {async: true}), mr: (this.object.type == 'specialisation'), isGM: game.user.isGM diff --git a/modules/heritiers-main.js b/modules/heritiers-main.js index 2d7c2ce..6da397b 100644 --- a/modules/heritiers-main.js +++ b/modules/heritiers-main.js @@ -17,6 +17,7 @@ import { HeritiersCombat } from "./heritiers-combat.js"; import { HeritiersItem } from "./heritiers-item.js"; import { HeritiersAutomation } from "./heritiers-automation.js"; import { HeritiersTokenHud } from "./heritiers-hud.js"; +import { HERITIERS_CONFIG } from "./heritiers-config.js"; /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -47,9 +48,10 @@ Hooks.once("init", async function () { CONFIG.Combat.documentClass = HeritiersCombat CONFIG.Actor.documentClass = HeritiersActor CONFIG.Item.documentClass = HeritiersItem - game.system.hawkmoon = { + game.system.lesheritiers = { HeritiersUtility, - HeritiersAutomation + HeritiersAutomation, + config: HERITIERS_CONFIG } /* -------------------------------------------- */ diff --git a/styles/simple.css b/styles/simple.css index e2457a4..bf1ebd3 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1,23 +1,27 @@ /* ==================== (A) Fonts ==================== */ /* ==================== (A) Fonts ==================== */ @font-face { - font-family: "Charlemagne"; + font-family: Charlemagne; src: url('../assets/fonts/CharlemagneStd-Bold.otf') format("otf"); } + @font-face { + font-family: GismondaFG; + src: url('../assets/fonts/GismondaFG.woff') format("woff"); + } :root { /* =================== 1. ACTOR SHEET FONT STYLES =========== */ - --window-header-font-family: Charlemagne; + --window-header-font-family: GismondaFG; --window-header-title-font-size: 1.1rem; --window-header-title-font-weight: normal; --window-header-title-color: #f5f5f5; - --major-button-font-family: Charlemagne; + --major-button-font-family: GismondaFG; --major-button-font-size: 1.05rem; --major-button-font-weight: normal; --major-button-color: #dadada; - --tab-header-font-family: Charlemagne; + --tab-header-font-family: GismondaFG; --tab-header-font-size: 1.0rem; --tab-header-font-weight: 700; --tab-header-color: #403f3e; @@ -44,7 +48,7 @@ /*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/ /* Global styles & Font */ .window-app { - font-family: Charlemagne; + font-family: GismondaFG; text-align: justify; font-size: 12px; letter-spacing: 1px; @@ -53,19 +57,20 @@ } /* Fonts */ .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item { - font-family: "Charlemagne"; + font-family: GismondaFG; font-size: 0.8rem; } /* For title, sidebar character and scene */ .sheet header.sheet-header h1 input { - font-family: "Charlemagne"; + font-family: GismondaFG; font-size: 0.8rem; - color: lightgray; + color: rgb(41, 38, 38); } .sheet nav.sheet-tabs { - font-family: "Charlemagne"; + font-family: "GismondaFG"; font-size: 0.8rem; color: #151c1f; } /* For nav and title */ + .window-app input, .fvtt-les-heritiers .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; } @@ -73,7 +78,7 @@ background-color: rgb(68, 25, 25); } .fvtt-les-heritiers .sheet-header input, .fvtt-les-heritiers .sheet-header select { - color: lightgray; + color: rgb(41, 38, 38); } .window-header{ background: rgba(0,0,0,0.75); @@ -236,13 +241,13 @@ table {border: 1px solid #7a7971;} -ms-flex-pack: start; justify-content: flex-start; margin-bottom: 10px; - background-image: url("../assets/ui/hawkmoon_background_01.png"); + background-image: url("../assets/ui/fiche_background_simple_01.webp"); } .background-sheet-header { - background-image: url("../assets/ui/hawkmoon_background_01.png"); + background-image: url("../assets/ui/fiche_background_simple_01.webp"); background-blend-mode: soft-light; - color: lightgray; + color: rgb(41, 38, 38); } .fvtt-les-heritiers .sheet-header .profile-img { @@ -298,8 +303,8 @@ table {border: 1px solid #7a7971;} border-bottom: 0; font-weight: bold; font-size: 2rem; - font-family: "Charlemagne"; - color: lightgray; + font-family: GismondaFG; + color: rgb(41, 38, 38); } .fvtt-les-heritiers .sheet-header h1.charname input { @@ -307,9 +312,9 @@ table {border: 1px solid #7a7971;} height: 100%; margin: 0; font-weight: bold; - font-family: "Charlemagne"; + font-family: GismondaFG; font-size: 2rem; - color: lightgray; + color: rgb(41, 38, 38); } .fvtt-les-heritiers .sheet-tabs { @@ -371,6 +376,7 @@ table {border: 1px solid #7a7971;} .fvtt-les-heritiers .tabs .item { /*line-height: 40px;*/ font-weight: bold; + font-family: GismondaFG; } .fvtt-les-heritiers .tabs .item.active { @@ -423,7 +429,7 @@ table {border: 1px solid #7a7971;} /* Sheet */ .window-app.sheet .window-content .sheet-header{ /*background: #011d33 url("../images/ui/fond1.webp") repeat left top;*/ - background: url("../assets/ui/pc_sheet_bg.webp"); + background: url("../assets/ui/fiche_background_simple_01.webp"); background-repeat: repeat; } @@ -438,7 +444,7 @@ table {border: 1px solid #7a7971;} .window-app .window-content, .window-app.sheet .window-content .sheet-body{ font-size: 0.8rem; - background: url("../assets/ui/pc_sheet_bg.webp"); + background: url("../assets/ui/fiche_background_simple_01.webp"); background-repeat: repeat-y; color: black; } @@ -467,8 +473,8 @@ table {border: 1px solid #7a7971;} border-top: 0 none; border-bottom: 0 none; /*background-color:#2e5561;*/ - color: #151c1f; - /*background-image: url("../assets/ui/hawkmoon_background_02.png");*/ + color: #cbdaa3; + background-image: url("../assets/ui/bandeau_01.webp"); } /* background: rgb(245,245,240) url("../images/ui/fond4.webp") repeat left top;*/ @@ -1410,6 +1416,12 @@ ul, li { min-width: 8rem; } .item-field-label-long2 { + padding-top: 6px; + flex-grow:1; + max-width: 14rem; + min-width: 14rem; +} +.item-field-label-long3 { padding-top: 6px; flex-grow:1; max-width: 20rem; diff --git a/template.json b/template.json index 4db45e5..dbe6a7a 100644 --- a/template.json +++ b/template.json @@ -215,21 +215,27 @@ }, "types": [ "talenfeet", + "avantage", + "desavangate", "capacitenaturelle", "pouvoir", "atoutfeerique", "competence", - "protection", + "arme", "monnaie", "equipement", - "artefact", - "ressource", "contact" ], "fee": { "feetype": 0, "description": "" }, + "avantage": { + "description": "" + }, + "desavantage": { + "description": "" + }, "capacitenaturelle": { "description": "" }, @@ -244,32 +250,9 @@ "profil": "", "niveau": 0, "predilection": false, - "specialites": "", + "specialites": [], "description": "" }, - "historique": { - "bonusmalus": "", - "templates": [ - "base" - ] - }, - "profil": { - "exemples": "", - "attribut1": "", - "attribut2": "", - "attribut3": "", - "competences": "", - "talentsinitie": "", - "prerequisaguerri": "", - "talentsaguerri": "", - "prerequismaitre": "", - "talentsmaitre": "", - "celluleinfo": "", - "equipement": "", - "templates": [ - "base" - ] - }, "equipement": { "templates": [ "base", @@ -294,37 +277,11 @@ "basequip" ] }, - "protection": { - "protection": 0, - "adversitepoids" :0, - "templates": [ - "base", - "basequip" - ] - }, "monnaie": { "templates": [ "base", "basequip" ] - }, - "artefact": { - "complexite": 0, - "branche": "", - "branche2": "none", - "dureerealisation": "", - "tempsroute": "", - "effetdejeu": "", - "defautcourant": "", - "autrescarac": "", - "avantagespossibles": "", - "avantages": "", - "competences": "", - "templates": [ - "base", - "basequip" - ] - } } } \ No newline at end of file diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index 4c4b67c..e95c530 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -11,78 +11,62 @@