Ajout du xplog
This commit is contained in:
@ -15,9 +15,9 @@ import { BoLCombatManager } from "./system/bol-combat.js"
|
||||
import { BoLTokenHud } from "./system/bol-action-hud.js"
|
||||
import { BoLHotbar } from "./system/bol-hotbar.js"
|
||||
import { BoLAdventureGenerator } from "./system/bol-adventure-generator.js"
|
||||
import { BoLCommands} from "./system/bol-commands.js"
|
||||
import { BoLCharacterSummary} from "./system/bol-character-summary.js"
|
||||
import { BoLRoll} from "./controllers/bol-rolls.js"
|
||||
import { BoLCommands } from "./system/bol-commands.js"
|
||||
import { BoLCharacterSummary } from "./system/bol-character-summary.js"
|
||||
import { BoLRoll } from "./controllers/bol-rolls.js"
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once('init', async function () {
|
||||
@ -30,7 +30,7 @@ Hooks.once('init', async function () {
|
||||
macros: Macros,
|
||||
config: BOL
|
||||
};
|
||||
|
||||
|
||||
// Game socket
|
||||
game.socket.on("system.bol", sockmsg => {
|
||||
BoLUtility.onSocketMessage(sockmsg);
|
||||
@ -45,7 +45,7 @@ Hooks.once('init', async function () {
|
||||
formula: "2d6+@attributes.mind.value+@aptitudes.init.value",
|
||||
decimals: 2
|
||||
};
|
||||
|
||||
|
||||
// Define custom Entity classes
|
||||
CONFIG.Actor.documentClass = BoLActor;
|
||||
CONFIG.Item.documentClass = BoLItem;
|
||||
@ -79,8 +79,8 @@ Hooks.once('init', async function () {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Register world usage statistics
|
||||
function registerUsageCount( registerKey ) {
|
||||
if ( game.user.isGM ) {
|
||||
function registerUsageCount(registerKey) {
|
||||
if (game.user.isGM) {
|
||||
game.settings.register(registerKey, "world-key", {
|
||||
name: "Unique world key",
|
||||
scope: "world",
|
||||
@ -90,14 +90,14 @@ function registerUsageCount( registerKey ) {
|
||||
});
|
||||
|
||||
let worldKey = game.settings.get(registerKey, "world-key")
|
||||
if ( worldKey == undefined || worldKey == "" ) {
|
||||
if (worldKey == undefined || worldKey == "") {
|
||||
worldKey = randomID(32)
|
||||
game.settings.set(registerKey, "world-key", worldKey )
|
||||
game.settings.set(registerKey, "world-key", worldKey)
|
||||
}
|
||||
// Simple API counter
|
||||
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
|
||||
//$.ajaxSetup({
|
||||
//headers: { 'Access-Control-Allow-Origin': '*' }
|
||||
//headers: { 'Access-Control-Allow-Origin': '*' }
|
||||
//})
|
||||
$.ajax(regURL)
|
||||
}
|
||||
@ -110,24 +110,40 @@ function welcomeMessage() {
|
||||
whisper: [game.user.id],
|
||||
content: `<div id="welcome-message-pegasus"><span class="rdd-roll-part">
|
||||
<strong>` + game.i18n.localize("BOL.chat.welcome1") + `</strong><p>` +
|
||||
game.i18n.localize("BOL.chat.welcome2") + "<p>" +
|
||||
game.i18n.localize("BOL.chat.welcome3") + "<p>" +
|
||||
game.i18n.localize("BOL.chat.welcome4") + "</p>" +
|
||||
game.i18n.localize("BOL.chat.welcome5") + "<br>" +
|
||||
game.i18n.localize("BOL.chat.welcome6")
|
||||
} )
|
||||
game.i18n.localize("BOL.chat.welcome2") + "<p>" +
|
||||
game.i18n.localize("BOL.chat.welcome3") + "<p>" +
|
||||
game.i18n.localize("BOL.chat.welcome4") + "</p>" +
|
||||
game.i18n.localize("BOL.chat.welcome5") + "<br>" +
|
||||
game.i18n.localize("BOL.chat.welcome6")
|
||||
})
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
Hooks.once('ready', async function () {
|
||||
|
||||
BoLUtility.ready()
|
||||
BoLCharacterSummary.ready()
|
||||
BoLCharacterSummary.ready()
|
||||
|
||||
registerUsageCount(game.system.id)
|
||||
|
||||
|
||||
welcomeMessage()
|
||||
|
||||
// User warning
|
||||
if (!game.user.isGM && game.user.character == undefined) {
|
||||
ui.notifications.info(game.i18n.localize("BOL.chat.pcwarning"));
|
||||
ChatMessage.create({
|
||||
content: game.i18n.localize("BOL.chat.pcwarningmsg") + game.user.name,
|
||||
user: game.user._id
|
||||
});
|
||||
}
|
||||
if (!game.user.isGM && game.user.character && !game.user.character.prototypeToken.actorLink) {
|
||||
ui.notifications.info(game.i18n.localize("BOL.chat.pcnotlinked"));
|
||||
ChatMessage.create({
|
||||
content: game.i18n.localize("BOL.chat.pcnotlinkedmsg") + game.user.name,
|
||||
user: game.user._id
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user