From 9f004950f4bd3364897c27a69520e62c47d177f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Bonnet?= Date: Thu, 4 Mar 2021 07:44:24 +0100 Subject: [PATCH] Improve sheets to be able to add the french version (#102) * Improve sheets to be able to add the french version * Update class.html Logic field should be plain text. * Update crew_ability.html Co-authored-by: megastruktur --- lang/en.json | 5 +++++ module/blades-actor-sheet.js | 8 ++++---- module/blades-crew-sheet.js | 2 +- module/blades-item-sheet.js | 2 +- scss/style.scss | 8 +++++++- styles/blades.css | 7 ++++++- templates/actor-sheet.html | 6 +++--- templates/crew-sheet.html | 8 ++++---- templates/items/ability.html | 2 +- templates/items/class.html | 4 ++-- templates/items/crew_ability.html | 2 +- templates/items/crew_type.html | 9 +++++---- templates/items/crew_upgrade.html | 2 +- templates/items/item.html | 2 +- templates/items/simple.html | 2 +- templates/parts/turf-list.html | 2 +- 16 files changed, 44 insertions(+), 27 deletions(-) diff --git a/lang/en.json b/lang/en.json index b3d454c..6373ea1 100644 --- a/lang/en.json +++ b/lang/en.json @@ -164,6 +164,11 @@ "BITD.Position": "Position", "BITD.Effect": "Effect", "BITD.Modifier": "Modifier", + + "BITD.Light": "light", + "BITD.Normal": "normal", + "BITD.Encumbered": "encumbered", + "BITD.OverMax": "over max", "BITD.Drain": "Drain", "BITD.Wear": "Wear", diff --git a/module/blades-actor-sheet.js b/module/blades-actor-sheet.js index 7c543ea..2cc6ce7 100644 --- a/module/blades-actor-sheet.js +++ b/module/blades-actor-sheet.js @@ -30,10 +30,10 @@ export class BladesActorSheet extends BladesSheet { data.data.loadout = loadout; // Encumbrance Levels - let load_level=["light","light","light","light","normal","normal","heavy","Encumbered", - "Encumbered","Encumbered","over max"]; - let mule_level=["light","light","light","light","light","light","normal","normal", - "heavy","Encumbered","over max"]; + let load_level=["BITD.Light","BITD.Light","BITD.Light","BITD.Light","BITD.Normal","BITD.Normal","BITD.Heavy","BITD.Encumbered", + "BITD.Encumbered","BITD.Encumbered","BITD.OverMax"]; + let mule_level=["BITD.Light","BITD.Light","BITD.Light","BITD.Light","BITD.Light","BITD.Light","BITD.Normal","BITD.Normal", + "BITD.Heavy","BITD.Encumbered","BITD.OverMax"]; let mule_present=0; //Sanity Check diff --git a/module/blades-crew-sheet.js b/module/blades-crew-sheet.js index e9ae64f..f65a1d0 100644 --- a/module/blades-crew-sheet.js +++ b/module/blades-crew-sheet.js @@ -11,7 +11,7 @@ export class BladesCrewSheet extends BladesSheet { return mergeObject(super.defaultOptions, { classes: ["blades-in-the-dark", "sheet", "actor"], template: "systems/blades-in-the-dark/templates/crew-sheet.html", - width: 930, + width: 940, height: 1020, tabs: [{navSelector: ".tabs", contentSelector: ".tab-content", initial: "turfs"}] }); diff --git a/module/blades-item-sheet.js b/module/blades-item-sheet.js index 4f8073a..884ab7e 100644 --- a/module/blades-item-sheet.js +++ b/module/blades-item-sheet.js @@ -9,7 +9,7 @@ export class BladesItemSheet extends ItemSheet { return mergeObject(super.defaultOptions, { classes: ["blades-in-the-dark", "sheet", "item"], - width: 'auto', + width: 560, height: 'auto', tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}] }); diff --git a/scss/style.scss b/scss/style.scss index ed8d73d..a5d607e 100644 --- a/scss/style.scss +++ b/scss/style.scss @@ -80,7 +80,7 @@ $hover-brightness: 0.8; .editor, .editor-content { - min-height: 280px; + min-height: 150px; } .flex-horizontal { @@ -453,10 +453,16 @@ $hover-brightness: 0.8; // Turfs. + #turf-container { + overflow-x: scroll; + overflow-y: clip; + } + #turf-list { display: flex; flex-direction: column; + width: 855px; .turf-row { display: flex; diff --git a/styles/blades.css b/styles/blades.css index 66e6629..b3bee42 100644 --- a/styles/blades.css +++ b/styles/blades.css @@ -74,7 +74,7 @@ } * .editor, * .editor-content { - min-height: 280px; + min-height: 150px; } * .flex-horizontal { display: flex; @@ -693,9 +693,14 @@ * #crew-reputation input[disabled=disabled] + label { background-image: url(assets/teeth/stresstooth-black.png); } +* #turf-container { + overflow-x: scroll; + overflow-y: clip; +} * #turf-list { display: flex; flex-direction: column; + width: 855px; } * #turf-list .turf-row { display: flex; diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index ad5b882..3af5367 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -272,7 +272,7 @@
{{item.name}}
-
{{item.data.description}}
+
{{{item.data.description}}}
@@ -285,7 +285,7 @@ {{!-- Owned Items Tab --}}
-

{{localize "BITD.Loadout"}}: {{data.loadout}}/{{data.load_level}}

+

{{localize "BITD.Loadout"}}: {{data.loadout}}/{{localize data.load_level}}

@@ -295,7 +295,7 @@
{{item.name}}
-
{{item.data.description}}
+
{{{item.data.description}}}
diff --git a/templates/crew-sheet.html b/templates/crew-sheet.html index e828887..f4ed8ae 100644 --- a/templates/crew-sheet.html +++ b/templates/crew-sheet.html @@ -30,7 +30,7 @@
- +
@@ -224,7 +224,7 @@ {{!-- Crew XP --}}
-
+
{{#multiboxes data.experience}} @@ -275,7 +275,7 @@
{{item.name}}
-
{{item.data.description}}
+
{{{item.data.description}}}
@@ -294,7 +294,7 @@
{{item.name}}
-
{{item.data.description}}
+
{{{item.data.description}}}
diff --git a/templates/items/ability.html b/templates/items/ability.html index bf03701..685b605 100644 --- a/templates/items/ability.html +++ b/templates/items/ability.html @@ -8,7 +8,7 @@ {{!-- Sheet Body --}}
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
diff --git a/templates/items/class.html b/templates/items/class.html index 3bb7dbe..5847d7d 100644 --- a/templates/items/class.html +++ b/templates/items/class.html @@ -8,13 +8,13 @@
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
- {{localize "BITD.ClassExpClue1"}}
{{localize "BITD.ClassExpClueDescription"}}
- {{localize "BITD.ClassExpClue2"}}
- {{localize "BITD.ClassExpClue3"}}
- + {{editor content=data.experience_clues target="data.experience_clues" button=true owner=owner editable=editable}} {{isG}} diff --git a/templates/items/crew_ability.html b/templates/items/crew_ability.html index b343f81..554c97f 100644 --- a/templates/items/crew_ability.html +++ b/templates/items/crew_ability.html @@ -8,7 +8,7 @@ {{!-- Sheet Body --}}
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
diff --git a/templates/items/crew_type.html b/templates/items/crew_type.html index 8d9c68d..a8d2a9a 100644 --- a/templates/items/crew_type.html +++ b/templates/items/crew_type.html @@ -8,10 +8,11 @@
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} - + {{editor content=data.experience_clues target="data.experience_clues" button=true owner=owner editable=editable}} + + +
{{> "systems/blades-in-the-dark/templates/parts/turf-list.html" turfs_data=data.turfs can_edit=true editable=editable}}
- - {{> "systems/blades-in-the-dark/templates/parts/turf-list.html" turfs_data=data.turfs can_edit=true editable=editable}} diff --git a/templates/items/crew_upgrade.html b/templates/items/crew_upgrade.html index 61112d1..4068bd8 100644 --- a/templates/items/crew_upgrade.html +++ b/templates/items/crew_upgrade.html @@ -9,7 +9,7 @@ {{!-- Sheet Body --}}
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} diff --git a/templates/items/item.html b/templates/items/item.html index a5da21a..af5383c 100644 --- a/templates/items/item.html +++ b/templates/items/item.html @@ -8,7 +8,7 @@ {{!-- Sheet Body --}}
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} diff --git a/templates/items/simple.html b/templates/items/simple.html index 093af91..19e5667 100644 --- a/templates/items/simple.html +++ b/templates/items/simple.html @@ -9,6 +9,6 @@ {{!-- Sheet Body --}}
- + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
diff --git a/templates/parts/turf-list.html b/templates/parts/turf-list.html index 96b18aa..a15788c 100644 --- a/templates/parts/turf-list.html +++ b/templates/parts/turf-list.html @@ -40,7 +40,7 @@ {{else}}

{{localize turf.name}}

{{#if turf.description}} -

{{localize turf.description}}

+

{{{localize turf.description}}}

{{/if}} {{#noteq id "8"}}