From b93a29f7fc336772e2d9cd8f646810f1ab07323a Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sun, 23 May 2021 00:03:37 +0200 Subject: [PATCH] Start 0.8 support --- module/actor-sheet.js | 8 ++++---- module/sos-card-deck.js | 2 +- templates/actor-sheet.html | 18 +++++++++--------- templates/item-armor-sheet.html | 7 +++++-- templates/item-commongear-sheet.html | 3 ++- templates/item-container-sheet.html | 6 +++--- templates/item-gear-sheet.html | 4 ++-- templates/item-geneline-sheet.html | 6 ++++-- templates/item-injury-sheet.html | 6 ++++-- templates/item-language-sheet.html | 6 +++--- templates/item-malady-sheet.html | 8 ++++---- templates/item-skillexperience-sheet.html | 7 ++++--- templates/item-subculture-sheet.html | 6 ++++-- templates/item-vehicle-sheet.html | 8 +++++--- templates/item-weakness-sheet.html | 6 ++++-- templates/item-weapon-sheet.html | 8 +++++--- 16 files changed, 63 insertions(+), 46 deletions(-) diff --git a/module/actor-sheet.js b/module/actor-sheet.js index e69b79d..0537ef1 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -55,10 +55,10 @@ export class SoSActorSheet extends ActorSheet { if ( a.name > b.name ) return 1; return -1; }); - formData.gears = this.actor.data.items.filter( item => item.type == 'gear').concat( this.actor.data.items.filter( item => item.type == 'container') ); + formData.gears = this.actor.data.items.filter( item => item.type == 'gear').concat( this.actor.data.items.filter( item => item.type == 'container') ); // Build the gear tree - formData.gearsRoot = formData.gears.filter(item => item.data.containerid == ""); + formData.gearsRoot = formData.gears.filter(item => item.data.data.containerid == ""); for ( let container of formData.gearsRoot) { if ( container.type == 'container') { container.data.contains = [] @@ -134,12 +134,12 @@ export class SoSActorSheet extends ActorSheet { }); html.find('.skill-label a').click((event) => { const li = $(event.currentTarget).parents(".item"); - const skill = this.actor.getOwnedItem(li.data("item-id")); + const skill = this.actor.get.items(li.data("item-id")); this.actor.rollSkill(skill); }); html.find('.weapon-label a').click((event) => { const li = $(event.currentTarget).parents(".item"); - const weapon = this.actor.getOwnedItem(li.data("item-id")); + const weapon = this.actor.get.items(li.data("item-id")); this.actor.rollWeapon(weapon); }); html.find('.skill-value').change((event) => { diff --git a/module/sos-card-deck.js b/module/sos-card-deck.js index 3fef1ba..3f1f3a6 100644 --- a/module/sos-card-deck.js +++ b/module/sos-card-deck.js @@ -38,7 +38,7 @@ export class SoSCardDeck { this.cleanCardList(); // Randomize deck while (this.data.deck.length != NB_POKER_CARD) { - let idx = new Roll("1d54").roll().total; + let idx = new Roll("1d54").roll( {async:false} ).total; if (!this.data.cardState[idx - 1]) { if (idx == 53) { // Red Joker this.data.deck.push( { cardName: 'jr' } ); diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index b2d1ea9..326846b 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -227,7 +227,7 @@ {{!-- Gears Tab --}}
-

Total Encumbrance : {{totalEncumbrance}} / {{stats.strength.value}}

+

Total Encumbrance : {{totalEncumbrance}} / {{data.data.stats.strength.value}}

Weapons

Equipment/Gears

- +{{/with}} diff --git a/templates/item-container-sheet.html b/templates/item-container-sheet.html index fd50779..9b7a727 100644 --- a/templates/item-container-sheet.html +++ b/templates/item-container-sheet.html @@ -1,8 +1,8 @@
- +
-

+

@@ -13,7 +13,7 @@
- +
{{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}} diff --git a/templates/item-gear-sheet.html b/templates/item-gear-sheet.html index 8dd71f5..181a526 100644 --- a/templates/item-gear-sheet.html +++ b/templates/item-gear-sheet.html @@ -1,8 +1,8 @@
- +
-

+

diff --git a/templates/item-geneline-sheet.html b/templates/item-geneline-sheet.html index 900649c..22154cc 100644 --- a/templates/item-geneline-sheet.html +++ b/templates/item-geneline-sheet.html @@ -1,13 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
+ {{#with data}}
@@ -35,6 +36,7 @@
+ {{/with}}
diff --git a/templates/item-injury-sheet.html b/templates/item-injury-sheet.html index 4795cba..76ea621 100644 --- a/templates/item-injury-sheet.html +++ b/templates/item-injury-sheet.html @@ -1,13 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
+ {{#with data}}
@@ -20,6 +21,7 @@
+ {{/with}}
diff --git a/templates/item-language-sheet.html b/templates/item-language-sheet.html index 2049b1e..5bfc7b2 100644 --- a/templates/item-language-sheet.html +++ b/templates/item-language-sheet.html @@ -1,8 +1,8 @@
- +
-

+

@@ -13,7 +13,7 @@
- {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} + {{editor content=data.ata.description target="data.description" button=true owner=owner editable=editable}}
diff --git a/templates/item-malady-sheet.html b/templates/item-malady-sheet.html index 0ba4655..b826474 100644 --- a/templates/item-malady-sheet.html +++ b/templates/item-malady-sheet.html @@ -1,14 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
- + {{#with data}}
@@ -28,6 +28,6 @@
- + {{/with}}
diff --git a/templates/item-skillexperience-sheet.html b/templates/item-skillexperience-sheet.html index 8d8562d..fe3f1c2 100644 --- a/templates/item-skillexperience-sheet.html +++ b/templates/item-skillexperience-sheet.html @@ -1,14 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
- + {{#with data}}
@@ -29,6 +29,7 @@
+ {{/with}}
diff --git a/templates/item-subculture-sheet.html b/templates/item-subculture-sheet.html index cbf062a..5b3b9fa 100644 --- a/templates/item-subculture-sheet.html +++ b/templates/item-subculture-sheet.html @@ -1,13 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
+ {{#with data}}
@@ -23,6 +24,7 @@
+ {{/with}}
diff --git a/templates/item-vehicle-sheet.html b/templates/item-vehicle-sheet.html index 24a6c7a..f0204d4 100644 --- a/templates/item-vehicle-sheet.html +++ b/templates/item-vehicle-sheet.html @@ -1,8 +1,8 @@
- +
-

+

@@ -10,7 +10,7 @@
- + {{#with data}}
@@ -35,6 +35,8 @@
+ {{/with}} + {{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}
diff --git a/templates/item-weakness-sheet.html b/templates/item-weakness-sheet.html index f555679..53d6c61 100644 --- a/templates/item-weakness-sheet.html +++ b/templates/item-weakness-sheet.html @@ -1,13 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
+ {{#with data}}
@@ -30,6 +31,7 @@
+ {{/with}}
diff --git a/templates/item-weapon-sheet.html b/templates/item-weapon-sheet.html index 7fe7c14..408a90d 100644 --- a/templates/item-weapon-sheet.html +++ b/templates/item-weapon-sheet.html @@ -1,13 +1,14 @@
- +
-

+

{{!-- Sheet Body --}}
+ {{#with data}}
@@ -82,7 +83,8 @@
- + {{/with}} + {{>"systems/foundryvtt-shadows-over-sol/templates/item-commongear-sheet.html"}}