updated to version 0.1.8
This commit is contained in:
parent
ba9a3493e8
commit
6915843c3a
@ -6,7 +6,7 @@
|
||||
"authors": [
|
||||
{ "name": "Robin Riis" }
|
||||
],
|
||||
"version": "0.1.7",
|
||||
"version": "0.1.8",
|
||||
"socket": true,
|
||||
"minimumCoreVersion": 10,
|
||||
"compatibility": {
|
||||
@ -32,7 +32,7 @@
|
||||
]
|
||||
},
|
||||
"esmodules": [
|
||||
"scripts/puckochat/main.js"
|
||||
"scripts/main.js"
|
||||
],
|
||||
"url": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module",
|
||||
"download": "https://git.puckoprutt.tech/puckoprutt/puckoprutt-foundry-module/archive/main.zip",
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
import { puckocommand } from "./commands.js"
|
||||
|
||||
Hooks.on("init", async function() {
|
||||
console.log("[puckoprutt] Hello Init");
|
||||
});
|
||||
|
||||
Hooks.on("ready", async function() {
|
||||
console.log("[puckoprutt] Hello Ready");
|
||||
});
|
||||
|
||||
Hooks.on("chatMessage", (log, message, data) => {
|
||||
let to_send = "";
|
||||
let user = game.users.get(data.user);
|
||||
let world = game.world.id;
|
||||
|
||||
if(message[0] === "!") to_send = puckocommand(user, world, log, message.slice(1).split(" "), data);
|
||||
|
||||
if(to_send !== "") {
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
speaker: ChatMessage.getSpeaker({actor: game.actors.getName("puckoprutt"), alias: "Almighty God"}),
|
||||
content: to_send
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user