From 29c0075190fa121f4049a77d372d7227cbc68ee7 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 18:43:17 +0000 Subject: [PATCH 01/12] fucking around again --- src/system-support/aa-WnG.js | 46 ++++++++++++++++++++++++++ src/system-support/index.js | 64 +++++++++++++++++++----------------- 2 files changed, 79 insertions(+), 31 deletions(-) create mode 100644 src/system-support/aa-WnG.js diff --git a/src/system-support/aa-WnG.js b/src/system-support/aa-WnG.js new file mode 100644 index 00000000..356ed99f --- /dev/null +++ b/src/system-support/aa-WnG.js @@ -0,0 +1,46 @@ +import { trafficCop } from "../router/traffic-cop.js" +import AAHandler from "../system-handlers/workflow-data.js"; +import { getRequiredData } from "./getRequiredData.js"; + +export function systemHooks() { + Hooks.on("createChatMessage", async (msg) => { + if (msg.user.id !== game.user.id) { return }; + const flags = msg.flags?.["wrath-and-glory"] ?? {}; + const itemId = flags.testData.testData.itemId; + const actorId = flags.testData.context.speaker.actor; + const tokenId = actorId.getActiveTokens()[0]; + /*const rollClass = flags.rollData.rollObject.class;*/ + routeMessage({itemId, tokenId, actorId, workflow: msg/*, rollClass*/}) + }); + Hooks.on("AutomatedAnimations-WorkflowStart", onWorkflowStart); + Hooks.on("createMeasuredTemplate", async (template, data, userId) => { + if (userId !== game.user.id) { return }; + templateAnimation(await getRequiredData({itemUuid: template.flags?.["wrath-and-glory"]?.origin, templateData: template, workflow: template, isTemplate: true})) + }) +} + +async function routeMessage(input) { + const requiredData = await getRequiredData(input); + if (!requiredData.item) { return; } + runWrathandGlory(requiredData); +} + +async function runWrathandGlory(data) { + const handler = await AAHandler.make(data) + trafficCop(handler); +} + +/*function onWorkflowStart(clonedData, animationData) { + // Repeat the animation in case of burst attacks. + if (animationData.primary != null && clonedData.workflow.flags["wrath-and-glory"].rollData.maxAdditionalHit != null) { + animationData.primary.options.repeat = (1 + clonedData.workflow.flags["wrath-and-glory"].rollData.maxAdditionalHit); + } +}*/ + +async function templateAnimation(input) { + if (!input.item) { + return; + } + const handler = await AAHandler.make(input) + trafficCop(handler) +} \ No newline at end of file diff --git a/src/system-support/index.js b/src/system-support/index.js index c5df1d04..c2e64adc 100644 --- a/src/system-support/index.js +++ b/src/system-support/index.js @@ -1,31 +1,33 @@ -export * as dnd5e from "./aa-dnd5e.js" -export * as sw5e from "./aa-sw5e.js" -export * as demonlord from "./aa-demonlord.js" -export * as pf2e from "./aa-pf2e.js" -export * as sfrpg from "./aa-sfrpg.js" -export * as swade from "./aa-swade.js" -export * as wfrp4e from "./aa-wfrpg.js" -export * as dcc from "./aa-dcc.js" -export * as pf1 from "./aa-pf1.js" -export * as a5e from "./aa-a5e.js" -export * as forbiddenlands from "./aa-forbidden-lands.js" -export * as starwarsffg from "./aa-starwarsffg.js" -export * as ose from "./aa-ose.js" -export * as D35e from "./aa-D35E.js" -export * as cyphersystem from "./aa-cyphersystem.js" -export * as alienrpg from "./aa-alienrpg.js" -export * as cyberpunkredcore from "./aa-cyberpunkred.js" -export * as TheWitcherTRPG from "./aa-TheWitcherTRPG.js" -export * as twodsix from "./aa-twodsix.js" -export * as od6s from "./aa-od6s.js" -export * as standard from "./aa-chatmessage.js" -export * as darkheresy from "./aa-darkheresy.js" -export * as shadowrun5e from "./aa-shadowrun5e.js" -export * as ds4 from "./aa-ds4.js" -export * as dnd4e from "./aa-dnd4e.js" -export * as ars from "./aa-ars.js" -export * as earthdawn4e from "./aa-ed4e.js" -export * as ptu from "./aa-ptu.js"; -export * as lancer from "./aa-lancer.js"; -export * as anarchy from "./aa-shadowrun-anarchy.js"; - +export * as dnd5e from "./aa-dnd5e.js" +export * as sw5e from "./aa-sw5e.js" +export * as demonlord from "./aa-demonlord.js" +export * as pf2e from "./aa-pf2e.js" +export * as sfrpg from "./aa-sfrpg.js" +export * as swade from "./aa-swade.js" +export * as wfrp4e from "./aa-wfrpg.js" +export * as dcc from "./aa-dcc.js" +export * as pf1 from "./aa-pf1.js" +export * as a5e from "./aa-a5e.js" +export * as forbiddenlands from "./aa-forbidden-lands.js" +export * as starwarsffg from "./aa-starwarsffg.js" +export * as ose from "./aa-ose.js" +export * as D35e from "./aa-D35E.js" +export * as cyphersystem from "./aa-cyphersystem.js" +export * as alienrpg from "./aa-alienrpg.js" +export * as cyberpunkredcore from "./aa-cyberpunkred.js" +export * as TheWitcherTRPG from "./aa-TheWitcherTRPG.js" +export * as twodsix from "./aa-twodsix.js" +export * as od6s from "./aa-od6s.js" +export * as standard from "./aa-chatmessage.js" +export * as darkheresy from "./aa-darkheresy.js" +export * as shadowrun5e from "./aa-shadowrun5e.js" +export * as ds4 from "./aa-ds4.js" +export * as dnd4e from "./aa-dnd4e.js" +export * as ars from "./aa-ars.js" +export * as earthdawn4e from "./aa-ed4e.js" +export * as ptu from "./aa-ptu.js"; +export * as lancer from "./aa-lancer.js"; +export * as anarchy from "./aa-shadowrun-anarchy.js"; +export * as WnG from "./aa-WnG.js"; + + From dbb265f97e73be3b54dca3aec5732b30adf85985 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 19:20:59 +0000 Subject: [PATCH 02/12] a --- package-lock.json | 233 ++++++++++++++++++++++++---------------------- 1 file changed, 120 insertions(+), 113 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18c3152d..12991e2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", - "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "cpu": [ "arm" ], @@ -314,9 +314,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", - "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "cpu": [ "arm64" ], @@ -329,9 +329,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", - "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", "cpu": [ "x64" ], @@ -344,9 +344,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", - "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", "cpu": [ "arm64" ], @@ -359,9 +359,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", - "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", "cpu": [ "x64" ], @@ -374,9 +374,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", - "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "cpu": [ "arm64" ], @@ -389,9 +389,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", - "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", "cpu": [ "x64" ], @@ -404,9 +404,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", - "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", "cpu": [ "arm" ], @@ -419,9 +419,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", - "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "cpu": [ "arm64" ], @@ -434,9 +434,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", - "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", "cpu": [ "ia32" ], @@ -449,9 +449,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", - "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "cpu": [ "loong64" ], @@ -464,9 +464,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", - "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "cpu": [ "mips64el" ], @@ -479,9 +479,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", - "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", "cpu": [ "ppc64" ], @@ -494,9 +494,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", - "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "cpu": [ "riscv64" ], @@ -509,9 +509,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", - "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", "cpu": [ "s390x" ], @@ -524,9 +524,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", - "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "cpu": [ "x64" ], @@ -539,9 +539,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", - "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "cpu": [ "x64" ], @@ -554,9 +554,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", - "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", "cpu": [ "x64" ], @@ -569,9 +569,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", - "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", "cpu": [ "x64" ], @@ -584,9 +584,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", - "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", "cpu": [ "arm64" ], @@ -599,9 +599,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", - "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", "cpu": [ "ia32" ], @@ -614,9 +614,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", - "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", "cpu": [ "x64" ], @@ -1580,9 +1580,9 @@ "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==" }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -1591,28 +1591,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, "node_modules/escalade": { @@ -2302,9 +2302,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "funding": [ { "type": "github", @@ -2482,9 +2482,9 @@ } }, "node_modules/postcss": { - "version": "8.4.23", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", - "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", "funding": [ { "type": "opencollective", @@ -2500,7 +2500,7 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -3506,9 +3506,9 @@ } }, "node_modules/rollup": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.23.0.tgz", - "integrity": "sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==", + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "bin": { "rollup": "dist/bin/rollup" }, @@ -3582,9 +3582,9 @@ } }, "node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -3944,13 +3944,13 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/vite": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.3.8.tgz", - "integrity": "sha512-uYB8PwN7hbMrf4j1xzGDk/lqjsZvCDbt/JC5dyfxc19Pg8kRm14LinK/uq+HSLNswZEoKmweGdtpbnxRtrAXiQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz", + "integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==", "dependencies": { - "esbuild": "^0.17.5", - "postcss": "^8.4.23", - "rollup": "^3.21.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" @@ -3958,12 +3958,16 @@ "engines": { "node": "^14.18.0 || >=16.0.0" }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", + "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", @@ -3976,6 +3980,9 @@ "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, @@ -4019,9 +4026,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" From a0f91febf2b182c88091933edf073ea9a0e2b60b Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 19:40:09 +0000 Subject: [PATCH 03/12] rename --- src/system-support/{aa-WnG.js => aa-wrath-and-glory.js} | 0 src/system-support/index.js | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename src/system-support/{aa-WnG.js => aa-wrath-and-glory.js} (100%) diff --git a/src/system-support/aa-WnG.js b/src/system-support/aa-wrath-and-glory.js similarity index 100% rename from src/system-support/aa-WnG.js rename to src/system-support/aa-wrath-and-glory.js diff --git a/src/system-support/index.js b/src/system-support/index.js index c2e64adc..91f702bf 100644 --- a/src/system-support/index.js +++ b/src/system-support/index.js @@ -28,6 +28,6 @@ export * as earthdawn4e from "./aa-ed4e.js" export * as ptu from "./aa-ptu.js"; export * as lancer from "./aa-lancer.js"; export * as anarchy from "./aa-shadowrun-anarchy.js"; -export * as WnG from "./aa-WnG.js"; +export * as wrath-and-glory from "./aa-wrath-and-glory.js"; From bdf8db2dce53e118cbbe9f5362c489208523c8a0 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 19:41:06 +0000 Subject: [PATCH 04/12] a --- src/system-support/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/system-support/index.js b/src/system-support/index.js index 91f702bf..f9fdac43 100644 --- a/src/system-support/index.js +++ b/src/system-support/index.js @@ -28,6 +28,4 @@ export * as earthdawn4e from "./aa-ed4e.js" export * as ptu from "./aa-ptu.js"; export * as lancer from "./aa-lancer.js"; export * as anarchy from "./aa-shadowrun-anarchy.js"; -export * as wrath-and-glory from "./aa-wrath-and-glory.js"; - - +export * as wrathandglory from "./aa-wrath-and-glory.js"; From cc807ce970f7a020eac5327af027c80b04a43b8f Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 19:47:23 +0000 Subject: [PATCH 05/12] a --- src/system-support/aa-wrath-and-glory.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 356ed99f..7ac307be 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -19,6 +19,10 @@ export function systemHooks() { }) } +console.log(itemId); +console.log(tokenId); +console.log(ActorId); + async function routeMessage(input) { const requiredData = await getRequiredData(input); if (!requiredData.item) { return; } From 7d27384d164254dbfd243f14c41c818151c5ff6c Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 20:55:36 +0000 Subject: [PATCH 06/12] new try --- src/system-support/aa-darkheresy.js | 2 +- src/system-support/aa-wrath-and-glory.js | 4 ---- src/system-support/aa-wrath-and-glory2.js | 24 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 src/system-support/aa-wrath-and-glory2.js diff --git a/src/system-support/aa-darkheresy.js b/src/system-support/aa-darkheresy.js index f3e6c445..f7c02bee 100644 --- a/src/system-support/aa-darkheresy.js +++ b/src/system-support/aa-darkheresy.js @@ -1,5 +1,5 @@ // Support submitted by FilippoPolo on GitHub - +input import { trafficCop } from "../router/traffic-cop.js" import AAHandler from "../system-handlers/workflow-data.js"; import { getRequiredData } from "./getRequiredData.js"; diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 7ac307be..356ed99f 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -19,10 +19,6 @@ export function systemHooks() { }) } -console.log(itemId); -console.log(tokenId); -console.log(ActorId); - async function routeMessage(input) { const requiredData = await getRequiredData(input); if (!requiredData.item) { return; } diff --git a/src/system-support/aa-wrath-and-glory2.js b/src/system-support/aa-wrath-and-glory2.js new file mode 100644 index 00000000..9a97b2d8 --- /dev/null +++ b/src/system-support/aa-wrath-and-glory2.js @@ -0,0 +1,24 @@ +import { trafficCop } from "../router/traffic-cop.js" +import AAHandler from "../system-handlers/workflow-data.js"; +import { getRequiredData } from "./getRequiredData.js"; +// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED +export function systemHooks() { + Hooks.on("createChatMessage", async (msg) => { + if (msg.user.id !== game.user.id) { return }; + + let compiledData = await getRequiredData({ + actorId: msg.flags["wrath-and-glory"].testData.context.speaker.actor + itemId: msg.flags["wrath-and-glory"].testData.testData.itemId, + targetIds: msg.flags["wrath-and-glory"].testData.context.targets + tokenId: actorId.getActiveTokens()[0], + workflow: msg, + }) + if (!compiledData.item) { return; } + runWrathandGlory(compiledData) + }); +} + +async function runWrathandGlory(input) { + const handler = await AAHandler.make(input) + trafficCop(handler); +} \ No newline at end of file From 789b665cd85d8e6f6fdb47ebc86535d74a47b5a9 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 20:56:55 +0000 Subject: [PATCH 07/12] new try --- src/system-support/aa-wrath-and-glory.js | 68 ++++++++--------------- src/system-support/aa-wrath-and-glory2.js | 24 -------- 2 files changed, 23 insertions(+), 69 deletions(-) delete mode 100644 src/system-support/aa-wrath-and-glory2.js diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 356ed99f..4b17004e 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -1,46 +1,24 @@ -import { trafficCop } from "../router/traffic-cop.js" -import AAHandler from "../system-handlers/workflow-data.js"; -import { getRequiredData } from "./getRequiredData.js"; - -export function systemHooks() { - Hooks.on("createChatMessage", async (msg) => { - if (msg.user.id !== game.user.id) { return }; - const flags = msg.flags?.["wrath-and-glory"] ?? {}; - const itemId = flags.testData.testData.itemId; - const actorId = flags.testData.context.speaker.actor; - const tokenId = actorId.getActiveTokens()[0]; - /*const rollClass = flags.rollData.rollObject.class;*/ - routeMessage({itemId, tokenId, actorId, workflow: msg/*, rollClass*/}) - }); - Hooks.on("AutomatedAnimations-WorkflowStart", onWorkflowStart); - Hooks.on("createMeasuredTemplate", async (template, data, userId) => { - if (userId !== game.user.id) { return }; - templateAnimation(await getRequiredData({itemUuid: template.flags?.["wrath-and-glory"]?.origin, templateData: template, workflow: template, isTemplate: true})) - }) -} - -async function routeMessage(input) { - const requiredData = await getRequiredData(input); - if (!requiredData.item) { return; } - runWrathandGlory(requiredData); -} - -async function runWrathandGlory(data) { - const handler = await AAHandler.make(data) - trafficCop(handler); -} - -/*function onWorkflowStart(clonedData, animationData) { - // Repeat the animation in case of burst attacks. - if (animationData.primary != null && clonedData.workflow.flags["wrath-and-glory"].rollData.maxAdditionalHit != null) { - animationData.primary.options.repeat = (1 + clonedData.workflow.flags["wrath-and-glory"].rollData.maxAdditionalHit); - } -}*/ - -async function templateAnimation(input) { - if (!input.item) { - return; - } - const handler = await AAHandler.make(input) - trafficCop(handler) +import { trafficCop } from "../router/traffic-cop.js" +import AAHandler from "../system-handlers/workflow-data.js"; +import { getRequiredData } from "./getRequiredData.js"; +// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED +export function systemHooks() { + Hooks.on("createChatMessage", async (msg) => { + if (msg.user.id !== game.user.id) { return }; + + let compiledData = await getRequiredData({ + actorId: msg.flags["wrath-and-glory"].testData.context.speaker.actor, + itemId: msg.flags["wrath-and-glory"].testData.testData.itemId, + targetIds: msg.flags["wrath-and-glory"].testData.context.targets, + tokenId: actorId.getActiveTokens()[0], + workflow: msg, + }) + if (!compiledData.item) { return; } + runWrathandGlory(compiledData) + }); +} + +async function runWrathandGlory(input) { + const handler = await AAHandler.make(input) + trafficCop(handler); } \ No newline at end of file diff --git a/src/system-support/aa-wrath-and-glory2.js b/src/system-support/aa-wrath-and-glory2.js deleted file mode 100644 index 9a97b2d8..00000000 --- a/src/system-support/aa-wrath-and-glory2.js +++ /dev/null @@ -1,24 +0,0 @@ -import { trafficCop } from "../router/traffic-cop.js" -import AAHandler from "../system-handlers/workflow-data.js"; -import { getRequiredData } from "./getRequiredData.js"; -// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED -export function systemHooks() { - Hooks.on("createChatMessage", async (msg) => { - if (msg.user.id !== game.user.id) { return }; - - let compiledData = await getRequiredData({ - actorId: msg.flags["wrath-and-glory"].testData.context.speaker.actor - itemId: msg.flags["wrath-and-glory"].testData.testData.itemId, - targetIds: msg.flags["wrath-and-glory"].testData.context.targets - tokenId: actorId.getActiveTokens()[0], - workflow: msg, - }) - if (!compiledData.item) { return; } - runWrathandGlory(compiledData) - }); -} - -async function runWrathandGlory(input) { - const handler = await AAHandler.make(input) - trafficCop(handler); -} \ No newline at end of file From 5a13332b0e77740bee8c8d5e74bb06851f205a43 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 21:05:46 +0000 Subject: [PATCH 08/12] bullshit --- src/system-support/aa-wrath-and-glory.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 4b17004e..3204ff4a 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -1,7 +1,7 @@ import { trafficCop } from "../router/traffic-cop.js" import AAHandler from "../system-handlers/workflow-data.js"; import { getRequiredData } from "./getRequiredData.js"; -// WILL NEED REWORK AFTER THE V10 VERSION IS RELEASED + export function systemHooks() { Hooks.on("createChatMessage", async (msg) => { if (msg.user.id !== game.user.id) { return }; @@ -18,6 +18,9 @@ export function systemHooks() { }); } +console.log(compiledData); +console.log(getRequiredData); + async function runWrathandGlory(input) { const handler = await AAHandler.make(input) trafficCop(handler); From 9620e0c545fbf97352a1962a00b3cd67dd445314 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 21:49:39 +0000 Subject: [PATCH 09/12] whirling --- src/system-support/aa-wrath-and-glory.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 3204ff4a..2240c01b 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -6,11 +6,12 @@ export function systemHooks() { Hooks.on("createChatMessage", async (msg) => { if (msg.user.id !== game.user.id) { return }; + const systemName = 'wrath-and-glory'; + let compiledData = await getRequiredData({ - actorId: msg.flags["wrath-and-glory"].testData.context.speaker.actor, - itemId: msg.flags["wrath-and-glory"].testData.testData.itemId, - targetIds: msg.flags["wrath-and-glory"].testData.context.targets, - tokenId: actorId.getActiveTokens()[0], + actorId: msg.speaker.actor ?? msg.flags[systemName].testData.context.speaker.actor, + targets: compileTargets(msg.flags[systemName].testData.context.targets), + itemId: msg.flags[systemName].testData.testData.itemId, workflow: msg, }) if (!compiledData.item) { return; } @@ -18,10 +19,12 @@ export function systemHooks() { }); } -console.log(compiledData); -console.log(getRequiredData); +function compileTargets(targets) { + if (!targets) { return []; } + return Array.from(targets).map(token => canvas.tokens.get(token._id)); +} async function runWrathandGlory(input) { - const handler = await AAHandler.make(input) + const handler = await AAHandler.make(input); trafficCop(handler); } \ No newline at end of file From 8208cd56842dcde6b73a75595e56cf5fef6c3b10 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 21:55:52 +0000 Subject: [PATCH 10/12] input --- src/system-support/aa-wrath-and-glory.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 2240c01b..89659a28 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -25,6 +25,7 @@ function compileTargets(targets) { } async function runWrathandGlory(input) { + console.log(input); const handler = await AAHandler.make(input); trafficCop(handler); } \ No newline at end of file From c5471a15e14896db7c1eba62479666a45b7ebfb8 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 17 Dec 2023 22:09:27 +0000 Subject: [PATCH 11/12] stuff --- src/system-support/aa-darkheresy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system-support/aa-darkheresy.js b/src/system-support/aa-darkheresy.js index f7c02bee..f3e6c445 100644 --- a/src/system-support/aa-darkheresy.js +++ b/src/system-support/aa-darkheresy.js @@ -1,5 +1,5 @@ // Support submitted by FilippoPolo on GitHub -input + import { trafficCop } from "../router/traffic-cop.js" import AAHandler from "../system-handlers/workflow-data.js"; import { getRequiredData } from "./getRequiredData.js"; From d6a5028931163cbe4e0d5cee1238929cf725ef45 Mon Sep 17 00:00:00 2001 From: TomChristoffer Date: Sun, 24 Dec 2023 14:16:20 +0000 Subject: [PATCH 12/12] No longer rolls on damage --- src/system-support/aa-wrath-and-glory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system-support/aa-wrath-and-glory.js b/src/system-support/aa-wrath-and-glory.js index 89659a28..7d8fcef1 100644 --- a/src/system-support/aa-wrath-and-glory.js +++ b/src/system-support/aa-wrath-and-glory.js @@ -5,8 +5,8 @@ import { getRequiredData } from "./getRequiredData.js"; export function systemHooks() { Hooks.on("createChatMessage", async (msg) => { if (msg.user.id !== game.user.id) { return }; - const systemName = 'wrath-and-glory'; + if (msg.flags[systemName].testData.result.damage.dice.length != 0) { return }; let compiledData = await getRequiredData({ actorId: msg.speaker.actor ?? msg.flags[systemName].testData.context.speaker.actor,