From a716a3b3d1a2681f42ec3ff953eac11f227159b1 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 8 Feb 2024 12:57:36 +0100 Subject: [PATCH] Enhance stats --- modules/wasteland-main.js | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/modules/wasteland-main.js b/modules/wasteland-main.js index 8fc2208..44e3b55 100644 --- a/modules/wasteland-main.js +++ b/modules/wasteland-main.js @@ -16,6 +16,7 @@ import { WastelandUtility } from "./wasteland-utility.js"; import { WastelandCombat } from "./wasteland-combat.js"; import { WastelandItem } from "./wasteland-item.js"; import { WASTELAND_CONFIG } from "./wasteland-config.js"; +import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js" /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -76,31 +77,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) - } -} /* -------------------------------------------- */ async function importDefaultScene() { @@ -120,7 +96,7 @@ Hooks.once("ready", function () { WastelandUtility.ready(); - registerUsageCount('fvtt-wasteland') + ClassCounter.registerUsageCount() welcomeMessage(); // User warning