Skip to content

Commit

Permalink
Removed statics
Browse files Browse the repository at this point in the history
  • Loading branch information
ChasarooniZ committed Aug 7, 2023
1 parent 53d6aed commit 58e4ebe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Hooks.on("init", async () => {
})

Hooks.on("ready", async () => {
if (!game.user.isGM) return;
console.log("PF2e RPG Numbers is ready");
game.ui.notify("PF2e RPG Numbers is ready")
if (!game.user.isGM) return;
game.RPGNumbers = new RPGNumbers();
})

Expand Down
10 changes: 5 additions & 5 deletions scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RPGNumbers {
}
};

static extractTerm(term, flavor = '') {
extractTerm(term, flavor = '') {
if (term.class === "NumericTerm") {
result.push({ dmg: term.number, type: term.options.flavor ?? flavor });
} else if (term.class === "Die") {
Expand Down Expand Up @@ -64,7 +64,7 @@ class RPGNumbers {
*/
//TODO make this work
//TODO add options to toggle doubling amt of numbers on crit etc. or combining them
static extractDamageInfo(rolls) {
extractDamageInfo(rolls) {
const result = [];
console.log({ rolls })

Expand All @@ -89,7 +89,7 @@ class RPGNumbers {
* @param {any} rolls Roll value from pf2e chat message
* @returns
*/
static extractDamageInfoCombined(rolls) {
extractDamageInfoCombined(rolls) {
const result = [];

for (const inp of rolls) {
Expand All @@ -112,7 +112,7 @@ class RPGNumbers {
//TODO settings on size etc.
//TODO add scaling based on % health
//TODO add scaling based on size
static generateDamageScroll(dmg_list, targets) {
generateDamageScroll(dmg_list, targets) {
for (const target_id of targets) {
const tok = game.canvas.tokens.get(target_id);
const size = tok.document.texture.scaleY * tok.document.width;
Expand All @@ -137,7 +137,7 @@ class RPGNumbers {
* @param {any} msg Message data from create Chat Message
* @returns {string[]} A list of all the ids of the targets
*/
static getTargetList(msg) {
getTargetList(msg) {
if (msg.flags?.["pf2e-target-damage"]?.targets) {
return msg.flags.pf2e - target - damage.targets.map(t => t.id);
} else {
Expand Down

0 comments on commit 58e4ebe

Please sign in to comment.