diff --git a/module/sos-main.js b/module/sos-main.js index d4f5f99..309efab 100644 --- a/module/sos-main.js +++ b/module/sos-main.js @@ -15,6 +15,7 @@ import { SoSUtility } from "./sos-utility.js"; import { SoSCombat } from "./sos-combat.js"; import { gearConverter } from "./gears_convert.js"; import { SoSGMDeck } from "./sos-gm-deck.js"; +import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js" /* -------------------------------------------- */ /* Foundry VTT Initialization */ @@ -89,30 +90,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: "XXX", - 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}"` - $.ajax(regURL) - /* -------------------------------------------- */ - } -} - /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ @@ -126,7 +103,7 @@ Hooks.once("ready", function () { user: game.user._id }); } - registerUsageCount("foundryvtt-shadows-over-sol") + ClassCounter.registerUsageCount() welcomeMessage();