From 12c2c46724d217a4c6d0351f6828ef86c8e7cbbc Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sun, 23 Oct 2022 09:55:02 +0200 Subject: [PATCH] New icons --- modules/hawkmoon-actor-sheet.js | 2 +- modules/hawkmoon-commands.js | 2 +- modules/hawkmoon-item-sheet.js | 4 +- modules/hawkmoon-main.js | 24 +++--- styles/simple.css | 5 ++ system.json | 54 +++---------- template.json | 2 +- templates/item-competence-sheet.html | 73 +++++++++-------- templates/item-equipement-sheet.html | 48 +++++------ templates/item-historique-sheet.html | 24 +++--- templates/item-monnaie-sheet.html | 2 +- templates/item-origine-sheet.html | 18 ----- templates/item-pacte-sheet.html | 31 -------- templates/item-predilection-sheet.html | 23 ------ templates/item-profil-sheet.html | 105 +++++++++++++++++++++---- templates/item-protection-sheet.html | 2 +- 16 files changed, 205 insertions(+), 214 deletions(-) delete mode 100644 templates/item-origine-sheet.html delete mode 100644 templates/item-pacte-sheet.html delete mode 100644 templates/item-predilection-sheet.html diff --git a/modules/hawkmoon-actor-sheet.js b/modules/hawkmoon-actor-sheet.js index 3b80393..2eec519 100644 --- a/modules/hawkmoon-actor-sheet.js +++ b/modules/hawkmoon-actor-sheet.js @@ -13,7 +13,7 @@ export class HawkmoonActorSheet extends ActorSheet { static get defaultOptions() { return mergeObject(super.defaultOptions, { - classes: ["fvtt-hawkmoon", "sheet", "actor"], + classes: ["fvtt-hawkmoon-cyd", "sheet", "actor"], template: "systems/fvtt-hawkmoon-cyd/templates/actor-sheet.html", width: 640, height: 720, diff --git a/modules/hawkmoon-commands.js b/modules/hawkmoon-commands.js index bbccd9b..9caf008 100644 --- a/modules/hawkmoon-commands.js +++ b/modules/hawkmoon-commands.js @@ -7,7 +7,7 @@ import { HawkmoonRollDialog } from "./hawkmoon-roll-dialog.js"; export class HawkmoonCommands { static init() { - if (!game.system.mournblade.commands) { + if (!game.system.hawkmoon.commands) { //const HawkmoonCommands = new HawkmoonCommands() //HawkmoonCommands.registerCommand({ path: ["/char"], func: (content, msg, params) => HawkmoonCommands.createChar(msg), descr: "Create a new character" }); //game.system.mournblade.commands = HawkmoonCommands diff --git a/modules/hawkmoon-item-sheet.js b/modules/hawkmoon-item-sheet.js index e292cba..25c0457 100644 --- a/modules/hawkmoon-item-sheet.js +++ b/modules/hawkmoon-item-sheet.js @@ -10,7 +10,7 @@ export class HawkmoonItemSheet extends ItemSheet { static get defaultOptions() { return mergeObject(super.defaultOptions, { - classes: ["fvtt-hawkmoon", "sheet", "item"], + classes: ["fvtt-hawkmoon-cyd", "sheet", "item"], template: "systems/fvtt-hawkmoon-cyd/templates/item-sheet.html", dragDrop: [{ dragSelector: null, dropSelector: null }], width: 620, @@ -167,7 +167,7 @@ export class HawkmoonItemSheet extends ItemSheet { /* -------------------------------------------- */ get template() { let type = this.item.type; - return `systems/fvtt-mournblade/templates/item-${type}-sheet.html`; + return `systems/fvtt-hawkmoon-cyd/templates/item-${type}-sheet.html`; } /* -------------------------------------------- */ diff --git a/modules/hawkmoon-main.js b/modules/hawkmoon-main.js index 41279a7..56d16cd 100644 --- a/modules/hawkmoon-main.js +++ b/modules/hawkmoon-main.js @@ -44,7 +44,7 @@ Hooks.once("init", async function () { CONFIG.Combat.documentClass = HawkmoonCombat CONFIG.Actor.documentClass = HawkmoonActor CONFIG.Item.documentClass = HawkmoonItem - game.system.hawkmon = { + game.system.hawkmosn = { HawkmoonUtility } @@ -58,7 +58,7 @@ Hooks.once("init", async function () { Items.registerSheet("fvtt-hawkmoon-cyd", HawkmoonItemSheet, { makeDefault: true }) HawkmoonUtility.init(); - + }); /* -------------------------------------------- */ @@ -67,7 +67,7 @@ function welcomeMessage() { user: game.user.id, whisper: [game.user.id], content: `
- Bienvenue dans Hawkmoon ! + Bienvenue dans Hawkmoon et le troisième Millénaire !

Les livres de Hawkmoon sont nécessaires pour jouer : https://www.titam-france.fr

Hawkmoon est jeude rôle publié par Titam France/Sombres projets, tout les droits leur appartiennent.

` }); @@ -75,8 +75,8 @@ function welcomeMessage() { /* -------------------------------------------- */ // Register world usage statistics -function registerUsageCount( registerKey ) { - if ( game.user.isGM ) { +function registerUsageCount(registerKey) { + if (game.user.isGM) { game.settings.register(registerKey, "world-key", { name: "Unique world key", scope: "world", @@ -86,14 +86,14 @@ function registerUsageCount( registerKey ) { }); let worldKey = game.settings.get(registerKey, "world-key") - if ( worldKey == undefined || worldKey == "" ) { + if (worldKey == undefined || worldKey == "") { worldKey = randomID(32) - game.settings.set(registerKey, "world-key", worldKey ) + game.settings.set(registerKey, "world-key", worldKey) } // Simple API counter let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"` //$.ajaxSetup({ - //headers: { 'Access-Control-Allow-Origin': '*' } + //headers: { 'Access-Control-Allow-Origin': '*' } //}) $.ajax(regURL) } @@ -113,9 +113,15 @@ Hooks.once("ready", function () { user: game.user._id }); } - + registerUsageCount('fvtt-hawkmoon-cyd') welcomeMessage() + + // CSS patch for v9 + if (game.version) { + let sidebar = document.getElementById("sidebar"); + sidebar.style.width = "min-content"; + } }); /* -------------------------------------------- */ diff --git a/styles/simple.css b/styles/simple.css index ce25bb4..0243d1a 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1351,6 +1351,7 @@ ul, li { min-width: 6rem; } .item-field-label-long { + padding-top: 6px; flex-grow:1; max-width: 8rem; min-width: 8rem; @@ -1369,4 +1370,8 @@ ul, li { .item-controls-fixed { min-width:3.2rem; max-width: 3.2rem; +} +.item-field { + justify-content: flex-start; + flex-grow: 1; } \ No newline at end of file diff --git a/system.json b/system.json index 4c54fa7..01776d5 100644 --- a/system.json +++ b/system.json @@ -9,7 +9,7 @@ } ], "esmodules": [ - "modules/hawkmon-main.js" + "modules/hawkmoon-main.js" ], "gridDistance": 5, "gridUnits": "m", @@ -28,7 +28,7 @@ }, { "type": "Item", - "label": "Armes & Boucliers", + "label": "Armes", "name": "armes", "path": "packs/armes.db", "system": "fvtt-hawkmoon-cyd", @@ -55,54 +55,18 @@ }, { "type": "Item", - "label": "Origines", - "name": "origines", - "path": "packs/origines.db", + "label": "Profils", + "name": "profils", + "path": "packs/profils.db", "system": "fvtt-hawkmoon-cyd", "private": false, "flags": {} }, { "type": "Item", - "label": "Héritages", - "name": "heritages", - "path": "packs/heritages.db", - "system": "fvtt-hawkmoon-cyd", - "private": false, - "flags": {} - }, - { - "type": "Item", - "label": "Métiers", - "name": "metiers", - "path": "packs/metiers.db", - "system": "fvtt-hawkmoon-cyd", - "private": false, - "flags": {} - }, - { - "type": "Item", - "label": "Tendances", - "name": "tendances", - "path": "packs/tendances.db", - "system": "fvtt-hawkmoon-cyd", - "private": false, - "flags": {} - }, - { - "type": "Item", - "label": "Traits chaotiques", - "name": "traits-chaotiques", - "path": "packs/traits-chaotiques.db", - "system": "fvtt-hawkmoon-cyd", - "private": false, - "flags": {} - }, - { - "type": "Item", - "label": "Runes", - "name": "runes", - "path": "packs/runes.db", + "label": "Talents", + "name": "talents", + "path": "packs/talents.db", "system": "fvtt-hawkmoon-cyd", "private": false, "flags": {} @@ -123,7 +87,7 @@ "styles": [ "styles/simple.css" ], - "title": "Mournblade", + "title": "Hawkmoon - CYD System", "url": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd", "background": "systems/fvtt-hawkmoon-cyd/assets/ui/fond_hawkmoon.webp", "compatibility": { diff --git a/template.json b/template.json index d6f794f..c828595 100644 --- a/template.json +++ b/template.json @@ -138,7 +138,7 @@ "exemples": "", "attribut1": "", "attribut2": "", - "talentsinities": "", + "talentsinitie": "", "prerequisaguerri": "", "talentsaguerri": "", "prerequismaitre": "", diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index 8f456ca..6df35fa 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -9,15 +9,15 @@ {{!-- Sheet Body --}}

-
- - - - - - - + +
  • + + - - - - {{#select system.attribut2}} @@ -37,10 +37,10 @@ {{/each}} {{/select}} - - - - {{#select system.attribut3}} @@ -49,27 +49,38 @@ {{/each}} {{/select}} - - - +
  • + +
  • Prédilections

    - -
      + +
    • +
        {{#each system.predilections as |predilection key|}}
      • - - - - - +
      • +
      • + +
      • +
      • + + + +
      • +
        {{/each}}
      - +
    • - - - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} +
    • +
    + {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
  • diff --git a/templates/item-equipement-sheet.html b/templates/item-equipement-sheet.html index 1771942..2a17604 100644 --- a/templates/item-equipement-sheet.html +++ b/templates/item-equipement-sheet.html @@ -1,27 +1,31 @@
    -
    - -
    -

    -
    -
    +
    + +
    +

    +
    +
    - {{!-- Sheet Body --}} -
    - -
    - - - - - - - - + {{!-- Sheet Body --}} +
    - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} +
      +
    • + + +
    • + +
    • + + +
    • +
    + + {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
    - -
    -
    + +
    + \ No newline at end of file diff --git a/templates/item-historique-sheet.html b/templates/item-historique-sheet.html index 4d0587e..4808491 100644 --- a/templates/item-historique-sheet.html +++ b/templates/item-historique-sheet.html @@ -9,21 +9,17 @@ {{!-- Sheet Body --}}
    -
    - - - - +
      +
    • + +
    • +
    • + +
    • - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} +
    + {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
    diff --git a/templates/item-monnaie-sheet.html b/templates/item-monnaie-sheet.html index 2f61605..8ebe157 100644 --- a/templates/item-monnaie-sheet.html +++ b/templates/item-monnaie-sheet.html @@ -11,7 +11,7 @@
    - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} + {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
    diff --git a/templates/item-origine-sheet.html b/templates/item-origine-sheet.html deleted file mode 100644 index 04527c4..0000000 --- a/templates/item-origine-sheet.html +++ /dev/null @@ -1,18 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{!-- Sheet Body --}} -
    - -
    - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} - -
    - -
    -
    diff --git a/templates/item-pacte-sheet.html b/templates/item-pacte-sheet.html deleted file mode 100644 index 4d0587e..0000000 --- a/templates/item-pacte-sheet.html +++ /dev/null @@ -1,31 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{!-- Sheet Body --}} -
    - -
    - - - - - - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} - -
    - -
    -
    diff --git a/templates/item-predilection-sheet.html b/templates/item-predilection-sheet.html deleted file mode 100644 index 5462793..0000000 --- a/templates/item-predilection-sheet.html +++ /dev/null @@ -1,23 +0,0 @@ -
    -
    - -
    -

    -
    -
    - - {{!-- Sheet Body --}} -
    - -
    - - - - - - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} - -
    - -
    -
    diff --git a/templates/item-profil-sheet.html b/templates/item-profil-sheet.html index 04527c4..ea5a8d2 100644 --- a/templates/item-profil-sheet.html +++ b/templates/item-profil-sheet.html @@ -1,18 +1,95 @@
    -
    - -
    -

    -
    -
    +
    + +
    +

    +
    +
    - {{!-- Sheet Body --}} -
    - -
    - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} + {{!-- Sheet Body --}} +
    + +
      +
    • + +
    • +
    • + +
    • +
    • + + +
    • +
    • + + +
    • + +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    - -
    -
    +
    + {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}} + +
    + +
    + \ No newline at end of file diff --git a/templates/item-protection-sheet.html b/templates/item-protection-sheet.html index 2977400..6e6b4bc 100644 --- a/templates/item-protection-sheet.html +++ b/templates/item-protection-sheet.html @@ -27,7 +27,7 @@
    - {{> systems/fvtt-mournblade/templates/partial-item-description.html}} + {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}