Skip to content

Commit

Permalink
Fixed errors in console for players due permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Yosoy-Ed committed Apr 26, 2024
1 parent 6363ed5 commit 3440f67
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
19 changes: 12 additions & 7 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
"id": "critic-message",
"title": "Critical Message",
"description": "A module that sends a message when a natural 1 or natural 20 is rolled.",
"authors": [{"name": "Yosoy-Ed"}],
"version": "0.1.0",
"authors": [
{
"name": "Yosoy-Ed",
"flags": {}
}
],
"version": "0.1.1",
"styles": [
"styles/cm.css"
],
"esmodules": [
"scripts/cm.js","scripts/cm-classes.js"
"scripts/cm.js",
"scripts/cm-classes.js"
],
"packs": [],
"url": "https://github.com/Yosoy-Ed/critic-message",
"url": "https://github.com/Yosoy-Ed/critic-message",
"manifest": "https://github.com/Yosoy-Ed/critic-message/releases/download/v0.1.1/module.json",
"download": "https://github.com/Yosoy-Ed/critic-message/releases/download/v0.1.1/module.zip",
"compatibility": {
"minimum": "11",
"verified": "11"
"verified": "11.315"
}
}
}
2 changes: 2 additions & 0 deletions scripts/cm-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export function detectroll(chatMessage) {

let d20dices = chatMessage.rolls[0].dice;
let userwhorolled = chatMessage.user.name;
if (game.user.isGM) {
verifyimgfolders();
}
criticalmessage(d20dices, userwhorolled);
}
11 changes: 7 additions & 4 deletions scripts/cm.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,17 @@ Hooks.once('init', function () {
});

Hooks.once('ready', function () {

if (game.user.isGM) {
verifyimgfolders();
}
);
}
});

Hooks.on('closeSettingsConfig', function () {
if (game.user.isGM) {
verifyimgfolders();
}
);
}
});

/*
To reset a variable:
Expand Down
8 changes: 8 additions & 0 deletions styles/cm.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@
}

.chatable {
background-image: none;
background-color: transparent;
border: none;
border-collapse: collapse;
margin: 0px;
}

.chatable tr, .chatable td {
background: none;
background-image: none;
background-color: transparent;
}

0 comments on commit 3440f67

Please sign in to comment.