From 8f0bf91464262b41a212416909d1547cdae4b12a Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 8 Feb 2024 12:50:51 +0100 Subject: [PATCH] Enhance stats --- modules/yggdrasill-main.js | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/modules/yggdrasill-main.js b/modules/yggdrasill-main.js index d2994ef..bad386d 100644 --- a/modules/yggdrasill-main.js +++ b/modules/yggdrasill-main.js @@ -14,6 +14,7 @@ import { YggdrasillActorSheet } from "./yggdrasill-actor-sheet.js"; import { YggdrasillFigurantSheet } from "./yggdrasill-figurant-sheet.js"; import { YggdrasillUtility } from "./yggdrasill-utility.js"; import { YggdrasillCombat } from "./yggdrasill-combat.js"; +import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js" /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -74,29 +75,6 @@ function welcomeMessage() { ` }); } -/* -------------------------------------------- */ -// Register world usage statistics -function registerUsageCount( registerKey ) { - if ( game.user.isGM ) { - game.settings.register(registerKey, "world-key", { - name: "Unique world key", - scope: "world", - config: false, - default: "", - type: String - }); - - let worldKey = game.settings.get(registerKey, "world-key") - if ( worldKey == undefined || worldKey == "" ) { - worldKey = randomID(32) - game.settings.set(registerKey, "world-key", worldKey ) - } - 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}"` - $.ajax(regURL) - /* -------------------------------------------- */ - } -} - /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ @@ -110,7 +88,8 @@ Hooks.once("ready", function () { user: game.user._id }); } - registerUsageCount("fvtt-yggdrasill") + + ClassCounter.registerUsageCount() welcomeMessage() });