forked from public/foundryvtt-reve-de-dragon
Add new Compendium
This commit is contained in:
@ -12,6 +12,7 @@ import { RdDActor } from "./actor.js";
|
||||
import { RdDItemSheet } from "./item-sheet.js";
|
||||
import { RdDActorSheet } from "./actor-sheet.js";
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
import { TMRUtility } from "./tmr-utility.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -50,7 +51,32 @@ Hooks.once("init", async function() {
|
||||
Actors.registerSheet("foundryvtt-reve-de-dragon", RdDActorSheet, { makeDefault: true });
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("foundryvtt-reve-de-dragon", RdDItemSheet, {makeDefault: true});
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
const table2func = { "queues": TMRUtility.getQueue, "ombre": TMRUtility.getOmbre, "tetehr": TMRUtility.getTeteHR, "tete": TMRUtility.getTete, "souffle": TMRUtility.getSouffle };
|
||||
Hooks.on("chatMessage", (html, content, msg) => {
|
||||
|
||||
// Setup new message's visibility
|
||||
let rollMode = game.settings.get("core", "rollMode");
|
||||
if (["gmroll", "blindroll"].includes(rollMode)) msg["whisper"] = ChatMessage.getWhisperIDs("GM");
|
||||
if (rollMode === "blindroll") msg["blind"] = true;
|
||||
msg["type"] = 0;
|
||||
|
||||
let regExp;
|
||||
regExp = /(\S+)/g;
|
||||
let commands = content.match(regExp);
|
||||
let command = commands[0];
|
||||
|
||||
|
||||
// Roll on a table
|
||||
if (command === "/table") {
|
||||
let tableName = commands[1].toLowerCase();
|
||||
table2func[tableName]();
|
||||
return false
|
||||
}
|
||||
|
||||
return true;
|
||||
} );
|
||||
|
Reference in New Issue
Block a user