From 28ec3900209b0b27a3d8c1521a7c18f50afc540e Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Mon, 26 May 2025 18:26:55 +0200 Subject: [PATCH] Various fixes --- css/fvtt-hellborn.css | 28 +++++++++++-------- lang/en.json | 10 +++---- .../applications/sheets/base-actor-sheet.mjs | 3 ++ module/models/equipment.mjs | 1 + module/models/malefica.mjs | 1 + styles/character.less | 20 +++++++------ styles/roll.less | 8 ++++-- templates/character-equipment.hbs | 2 ++ templates/character-main.hbs | 4 +-- templates/chat-malefica.hbs | 1 + templates/chat-message.hbs | 2 +- templates/chat-tarot.hbs | 15 ++++++++++ templates/equipment.hbs | 1 + templates/malefica.hbs | 1 + 14 files changed, 67 insertions(+), 30 deletions(-) create mode 100644 templates/chat-tarot.hbs diff --git a/css/fvtt-hellborn.css b/css/fvtt-hellborn.css index 7e12123..44d440a 100644 --- a/css/fvtt-hellborn.css +++ b/css/fvtt-hellborn.css @@ -547,16 +547,16 @@ i.fvtt-hellborn { max-width: 1.8rem; } .fvtt-hellborn .tab.character-equipment .main-div .weapons .weapon .properties { - min-width: 18rem; - max-width: 18rem; + min-width: 16.3rem; + max-width: 16.3rem; } .fvtt-hellborn .tab.character-equipment .main-div .weapons .weapon .range { - min-width: 4rem; - max-width: 4rem; + min-width: 4.5rem; + max-width: 4.5rem; } .fvtt-hellborn .tab.character-equipment .main-div .weapons .weapon .ammo { - min-width: 3rem; - max-width: 3rem; + min-width: 4.5rem; + max-width: 4.5rem; } .fvtt-hellborn .tab.character-equipment .main-div .weapons .weapon .type { min-width: 3rem; @@ -636,8 +636,12 @@ i.fvtt-hellborn { max-width: 1.8rem; } .fvtt-hellborn .tab.character-equipment .main-div .equipments .equipment .name { - min-width: 12rem; - max-width: 12rem; + min-width: 10rem; + max-width: 10rem; +} +.fvtt-hellborn .tab.character-equipment .main-div .equipments .equipment .quantity { + min-width: 2rem; + max-width: 2rem; } .fvtt-hellborn .tab.character-equipment .main-div .equipments .equipment .item-img { width: 24px; @@ -2416,9 +2420,11 @@ i.fvtt-hellborn { flex-direction: row; } .dice-roll .intro-chat .intro-img { - padding: 5px; - width: 80px; - align-self: center; + padding: 4px; + max-width: 80px; + min-width: 80px; + align-self: top; + text-align: center; } .dice-roll .intro-chat .intro-right { display: flex; diff --git a/lang/en.json b/lang/en.json index d8ffe58..6ee8c93 100644 --- a/lang/en.json +++ b/lang/en.json @@ -334,11 +334,8 @@ "description": { "label": "Description" }, - "enc": { - "label": "Enc" - }, - "techAge": { - "label": "Tech Age" + "quantity": { + "label": "Quantity" } } }, @@ -476,6 +473,9 @@ }, "Malefica": { "FIELDS": { + "duration": { + "label": "Duration" + }, "description": { "label": "Description" }, diff --git a/module/applications/sheets/base-actor-sheet.mjs b/module/applications/sheets/base-actor-sheet.mjs index f5d0361..447e3af 100644 --- a/module/applications/sheets/base-actor-sheet.mjs +++ b/module/applications/sheets/base-actor-sheet.mjs @@ -214,6 +214,9 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found if (item.type === "species-trait") { content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-hellborn/templates/chat-trait.hbs", item.toObject()) } + if (item.type === "tarot") { + content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-hellborn/templates/chat-tarot.hbs", item.toObject()) + } const chatData = { user: game.user.id, speaker: ChatMessage.getSpeaker({ actor: this.actor }), diff --git a/module/models/equipment.mjs b/module/models/equipment.mjs index 1a73000..cef53ba 100644 --- a/module/models/equipment.mjs +++ b/module/models/equipment.mjs @@ -8,6 +8,7 @@ export default class HellbornEquipment extends foundry.abstract.TypeDataModel { schema.description = new fields.HTMLField({ required: true, textSearch: true }) + schema.quantity = new fields.NumberField({ required: true, initial: 1, min: 0, integer: true }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) return schema diff --git a/module/models/malefica.mjs b/module/models/malefica.mjs index 63a54f0..64d8cf8 100644 --- a/module/models/malefica.mjs +++ b/module/models/malefica.mjs @@ -11,6 +11,7 @@ export default class HellbornMalefica extends foundry.abstract.TypeDataModel { schema.domain = new fields.StringField({ required: true, nullable: false, choices: SYSTEM.MALEFICA_DOMAINS, initial: "adfectus" }) schema.level = new fields.StringField({ required: true, nullable: false, choices: SYSTEM.MALEFICA_LEVELS, initial: "1" }) schema.time = new fields.StringField({ required: true, initial : "" }) + schema.duration = new fields.StringField({ required: true, initial : "" }) schema.hasDamage = new fields.BooleanField({ required: true, initial: false }) schema.damage = new fields.StringField({ required: false, initial : "" }) schema.damageType = new fields.StringField({ required: false, initial : "" }) diff --git a/styles/character.less b/styles/character.less index a2c02ef..1b40393 100644 --- a/styles/character.less +++ b/styles/character.less @@ -421,16 +421,16 @@ max-width: 1.8rem; } .properties { - min-width: 18rem; - max-width: 18rem; + min-width: 16.3rem; + max-width: 16.3rem; } .range { - min-width: 4rem; - max-width: 4rem; + min-width: 4.5rem; + max-width: 4.5rem; } .ammo { - min-width: 3rem; - max-width: 3rem; + min-width: 4.5rem; + max-width: 4.5rem; } .type { min-width: 3rem; @@ -512,8 +512,12 @@ max-width: 1.8rem; } .name { - min-width: 12rem; - max-width: 12rem; + min-width: 10rem; + max-width: 10rem; + } + .quantity { + min-width: 2rem; + max-width: 2rem; } .item-img { width: 24px; diff --git a/styles/roll.less b/styles/roll.less index b613a63..f90d0cc 100644 --- a/styles/roll.less +++ b/styles/roll.less @@ -99,9 +99,11 @@ display: flex; flex-direction: row; .intro-img { - padding: 5px; - width: 80px; - align-self: center; + padding: 4px; + max-width: 80px; + min-width : 80px; + align-self: top; + text-align: center; } .intro-right { display: flex; diff --git a/templates/character-equipment.hbs b/templates/character-equipment.hbs index e378d08..0f95093 100644 --- a/templates/character-equipment.hbs +++ b/templates/character-equipment.hbs @@ -76,6 +76,8 @@
{{item.name}}
+ {{item.system.quantity}} +
diff --git a/templates/character-main.hbs b/templates/character-main.hbs index 734b1d6..625d520 100644 --- a/templates/character-main.hbs +++ b/templates/character-main.hbs @@ -44,7 +44,7 @@
- +
- + Reversed
+ {{formField systemFields.quantity value=system.quantity}} {{formField systemFields.cost value=system.cost}}
diff --git a/templates/malefica.hbs b/templates/malefica.hbs index 45b4a37..6de871d 100644 --- a/templates/malefica.hbs +++ b/templates/malefica.hbs @@ -8,6 +8,7 @@ {{formField systemFields.domain value=system.domain localize=true}} {{formField systemFields.level value=system.level localize=true}} {{formField systemFields.time value=system.time localize=true }} + {{formField systemFields.duration value=system.duration localize=true}} {{formField systemFields.range value=system.range localize=true}} {{formField systemFields.target value=system.target localize=true}} {{formField systemFields.hasDamage value=system.hasDamage localize=true}}