From 2c12ec38fb629751dffedaa313f685fb3b74b09f Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 8 Feb 2024 12:51:41 +0100 Subject: [PATCH] Enhance stats --- modules/hawkmoon-main.js | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/modules/hawkmoon-main.js b/modules/hawkmoon-main.js index 8c89515..30597e3 100644 --- a/modules/hawkmoon-main.js +++ b/modules/hawkmoon-main.js @@ -18,6 +18,7 @@ import { HawkmoonCombat } from "./hawkmoon-combat.js"; import { HawkmoonItem } from "./hawkmoon-item.js"; import { HawkmoonAutomation } from "./hawkmoon-automation.js"; import { HawkmoonTokenHud } from "./hawkmoon-hud.js"; +import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js" /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -82,32 +83,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) - } - // 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': '*' } - //}) - $.ajax(regURL) - } -} - /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ @@ -124,7 +99,7 @@ Hooks.once("ready", function () { }); } - registerUsageCount('fvtt-hawkmoon-cyd') + ClassCounter.registerUsageCount(); welcomeMessage() });