From 922376c18b86a238b475ce33fa98d1e3287c9f12 Mon Sep 17 00:00:00 2001 From: Holly Jencka Date: Wed, 7 Jun 2023 08:28:06 -0600 Subject: [PATCH] Creature Roll Fix - 0.3.7 --- module/actor/actor.js | 10 ++++++++++ module/mosh.js | 5 ++++- packs/tables/{000009.log => 000017.log} | 0 packs/tables/CURRENT | 2 +- packs/tables/LOG | 6 +++--- packs/tables/LOG.old | 6 +++--- .../tables/{MANIFEST-000008 => MANIFEST-000016} | Bin 146 -> 146 bytes system.json | 2 +- 8 files changed, 22 insertions(+), 9 deletions(-) rename packs/tables/{000009.log => 000017.log} (100%) rename packs/tables/{MANIFEST-000008 => MANIFEST-000016} (87%) diff --git a/module/actor/actor.js b/module/actor/actor.js index c4ef00e..eb51c73 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -359,6 +359,8 @@ export class MothershipActor extends Actor { r._total = 0; } + console.log(r); + if (a._total == 100) { //a.results[0] = 0; a._total = 0; @@ -385,6 +387,14 @@ export class MothershipActor extends Actor { if (attribute.mod != 0) mod += attribute.mod; console.log("Bonus: " + mod); + + + + + if(isNaN(mod)) mod = 0; + + console.log("Bonus: " + mod); + let targetValue = attribute.value + mod + (item == "" ? 0 : parseInt(bonus)); let critical = false; diff --git a/module/mosh.js b/module/mosh.js index 533cc6f..4e3507c 100644 --- a/module/mosh.js +++ b/module/mosh.js @@ -106,7 +106,10 @@ Hooks.on("preCreateActor", (document, createData, options, userId) => { }) Hooks.on('renderSidebarTab', async (app, html) => { - if (app.options.id == "actors") { + console.log(app); + console.log(app.options.id); + if (app.options.id == "actors" || app.title == "Actors Directory") { + console.log("testing~"); let button = $(``); button.click(function () { d.render(true); diff --git a/packs/tables/000009.log b/packs/tables/000017.log similarity index 100% rename from packs/tables/000009.log rename to packs/tables/000017.log diff --git a/packs/tables/CURRENT b/packs/tables/CURRENT index d408ea0..32108be 100644 --- a/packs/tables/CURRENT +++ b/packs/tables/CURRENT @@ -1 +1 @@ -MANIFEST-000008 +MANIFEST-000016 diff --git a/packs/tables/LOG b/packs/tables/LOG index fc71e9e..29d37f3 100644 --- a/packs/tables/LOG +++ b/packs/tables/LOG @@ -1,3 +1,3 @@ -2023/05/31-18:27:09.501 c860 Recovering log #7 -2023/05/31-18:27:09.527 c860 Delete type=0 #7 -2023/05/31-18:27:09.528 c860 Delete type=3 #6 +2023/06/05-20:11:24.194 c640 Recovering log #15 +2023/06/05-20:11:24.208 c640 Delete type=0 #15 +2023/06/05-20:11:24.208 c640 Delete type=3 #14 diff --git a/packs/tables/LOG.old b/packs/tables/LOG.old index cbb138f..c599920 100644 --- a/packs/tables/LOG.old +++ b/packs/tables/LOG.old @@ -1,3 +1,3 @@ -2023/05/28-21:57:09.442 8818 Recovering log #4 -2023/05/28-21:57:09.478 8818 Delete type=0 #4 -2023/05/28-21:57:09.479 8818 Delete type=3 #2 +2023/06/01-07:43:44.537 ca04 Recovering log #12 +2023/06/01-07:43:44.550 ca04 Delete type=0 #12 +2023/06/01-07:43:44.550 ca04 Delete type=3 #10 diff --git a/packs/tables/MANIFEST-000008 b/packs/tables/MANIFEST-000016 similarity index 87% rename from packs/tables/MANIFEST-000008 rename to packs/tables/MANIFEST-000016 index 3a555faeb6e5e10d997f263674f73c0d1585c229..231109e845c20db8e3c82282851385595a180fa9 100644 GIT binary patch delta 22 dcmbQlIEisWGyiign?4Q(MkYZ{24*1^Q2<3d1Xln6 delta 22 dcmbQlIEisWGymQHeykh}j7*%I49r|Cq5w=e1iJtL diff --git a/system.json b/system.json index 81f1ef4..d1bf0d3 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "mosh", "title": "MoSh - Unofficial Mothership", "description": "The unofficial Mothership system for FoundryVTT.", - "version": "0.3.6", + "version": "0.3.7", "esmodules": [ "module/mosh.js" ],