From 43e49a0eb8cfedab19eff859c93a2bd68498d9cd Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 8 Feb 2024 12:46:49 +0100 Subject: [PATCH] New common CounterClass --- module/rdd-main.js | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/module/rdd-main.js b/module/rdd-main.js index 076a4d92..23ddfa19 100644 --- a/module/rdd-main.js +++ b/module/rdd-main.js @@ -64,6 +64,7 @@ import { RdDItemArmure } from "./item/armure.js"; import { AutoAdjustDarkness as AutoAdjustDarkness } from "./time/auto-adjust-darkness.js"; import { RdDCreature } from "./actor/creature.js"; import { RdDTMRDialog } from "./rdd-tmr-dialog.js"; +import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js" /** * RdD system @@ -275,7 +276,7 @@ export class SystemReveDeDragon { if (Misc.isUniqueConnectedGM()) { new Migrations().migrate(); this.messageDeBienvenue(); - this.registerUsageCount(SYSTEM_RDD); + ClassCounter.registerUsageCount(); } StatusEffects.onReady(); @@ -306,31 +307,6 @@ export class SystemReveDeDragon { ` }); } } - - /* -------------------------------------------- */ - // Register world usage statistics - async registerUsageCount(registerKey) { - if (game.user.isGM) { - game.settings.register("world", "world-key", { - name: "Unique world key", - scope: "world", - config: false, - default: "NONE", - type: String - }); - - let worldKey = game.settings.get("world", "world-key") - if (worldKey == undefined || worldKey == "" || worldKey == "NONE") { - worldKey = randomID(32) - game.settings.set("world", "world-key", worldKey) - } - let lang = game.settings.get("core", "language") - let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&lang="${lang}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"` - $.ajax(regURL) - /* -------------------------------------------- */ - } - } - } SystemReveDeDragon.start();