Correction sur competences à 0 + diverses ameliorations

This commit is contained in:
2024-03-06 18:46:53 +01:00
parent 67bf71e6c0
commit 8c38aead3e
67 changed files with 277 additions and 204 deletions

View File

@@ -78,6 +78,17 @@ function welcomeMessage() {
` });
}
/* -------------------------------------------- */
async function importDefaultScene() {
let exists = game.scenes.find(j => j.name == "Accueil");
if (!exists) {
const scenes = await HeritiersUtility.loadCompendium("fvtt-les-heritiers.scenes")
let newDocuments = scenes.filter(i => i.name == "Accueil");
await game.scenes.documentClass.create(newDocuments);
game.scenes.find(i => i.name == "Accueil").activate();
}
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
@@ -101,7 +112,8 @@ Hooks.once("ready", function () {
}).catch(err=>
console.log("No stats available, giving up.")
)
welcomeMessage()
welcomeMessage();
importDefaultScene();
});
@@ -112,7 +124,7 @@ Hooks.on("chatMessage", (html, content, msg) => {
if (content[0] == '/') {
let regExp = /(\S+)/g;
let commands = content.match(regExp);
if (game.system.mournblade.commands.processChatCommand(commands, content, msg)) {
if (game.system.lesheritiers.commands.processChatCommand(commands, content, msg)) {
return false;
}
}