#17 Gestion heure et calendrier
This commit is contained in:
@ -105,6 +105,8 @@ Hooks.once("init", async function() {
|
||||
rollDataHandler: {},
|
||||
TMRUtility: TMRUtility
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register("foundryvtt-reve-de-dragon", "accorder-entite-cauchemar", {
|
||||
name: "Accorder le rêve aux entités",
|
||||
hint: "A quel moment les personnages doivent accorder leur rêve aux entités de cauchemar",
|
||||
@ -119,13 +121,21 @@ Hooks.once("init", async function() {
|
||||
default: "avant-encaissement"
|
||||
});
|
||||
|
||||
// Create specific settings
|
||||
// game.settings.register("foundryvtt-reve-de-dragon", "configuration", {
|
||||
// name: "configuration",
|
||||
// scope: "world",
|
||||
// config: false,
|
||||
// type: Object
|
||||
// });
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register("foundryvtt-reve-de-dragon", "calendrier", {
|
||||
name: "calendrier",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: Object
|
||||
});
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register("foundryvtt-reve-de-dragon", "calendrier-pos", {
|
||||
name: "calendrierPos",
|
||||
scope: "world",
|
||||
config: false,
|
||||
type: Object
|
||||
});
|
||||
/* -------------------------------------------- */
|
||||
game.settings.register("foundryvtt-reve-de-dragon", "dice-so-nice", {
|
||||
name: "Montrer les dés pour toutes les jets",
|
||||
hint: "Utilise Dice So Nice pour tous les jets de dés possibles. Décocher pour limiter à la table de résolution",
|
||||
@ -136,19 +146,19 @@ Hooks.once("init", async function() {
|
||||
});
|
||||
//game.settings.get("<systemName>","<settingName>") to retrieve it and game.settings.set("<systemName>","<settingName>", <newValue>)
|
||||
|
||||
/**
|
||||
* Set an initiative formula for the system
|
||||
* @type {String}
|
||||
*/
|
||||
/* -------------------------------------------- */
|
||||
// Set an initiative formula for the system
|
||||
CONFIG.Combat.initiative = {
|
||||
formula: "1d20",
|
||||
decimals: 2
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
game.socket.on("system.foundryvtt-reve-de-dragon", data => {
|
||||
RdDUtility.performSocketMesssage( data );
|
||||
});
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Define custom Entity classes
|
||||
CONFIG.Actor.entityClass = RdDActor;
|
||||
CONFIG.RDD = {
|
||||
@ -159,6 +169,7 @@ Hooks.once("init", async function() {
|
||||
difficultesLibres : RdDUtility.getDifficultesLibres()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("foundryvtt-reve-de-dragon", RdDActorSheet, {
|
||||
@ -209,13 +220,18 @@ Hooks.once("renderApplication", () => {
|
||||
/* Foundry VTT Initialization */
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once("ready", function() {
|
||||
/* Affiche le calendrier */
|
||||
//let calendrier = new RdDCalendrier();
|
||||
//let templatePath = "systems/foundryvtt-reve-de-dragon/templates/calendar-template.html";
|
||||
//let templateData = {};
|
||||
/* DISABLEDrenderTemplate(templatePath, templateData).then(html => {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Affiche/Init le calendrier */
|
||||
let calendrier = new RdDCalendrier();
|
||||
calendrier.initCalendrier();
|
||||
let templatePath = "systems/foundryvtt-reve-de-dragon/templates/calendar-template.html";
|
||||
let templateData = {};
|
||||
renderTemplate(templatePath, templateData).then(html => {
|
||||
calendrier.render(true);
|
||||
} ); */
|
||||
} );
|
||||
game.system.rdd.calendrier = calendrier; // Reference;
|
||||
|
||||
// Avertissement si joueur sans personnage
|
||||
if ( !game.user.isGM && game.user.character == undefined) {
|
||||
ui.notifications.info( "Attention ! Vous n'êtes connecté à aucun personnage !" );
|
||||
|
Reference in New Issue
Block a user