Enhance stats

This commit is contained in:
LeRatierBretonnien 2024-02-08 12:53:15 +01:00
parent 6e5bb5da32
commit a3b6908a17

View File

@ -15,6 +15,7 @@ import { SoSUtility } from "./sos-utility.js";
import { SoSCombat } from "./sos-combat.js"; import { SoSCombat } from "./sos-combat.js";
import { gearConverter } from "./gears_convert.js"; import { gearConverter } from "./gears_convert.js";
import { SoSGMDeck } from "./sos-gm-deck.js"; import { SoSGMDeck } from "./sos-gm-deck.js";
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* 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 */ /* Foundry VTT Initialization */
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -126,7 +103,7 @@ Hooks.once("ready", function () {
user: game.user._id user: game.user._id
}); });
} }
registerUsageCount("foundryvtt-shadows-over-sol") ClassCounter.registerUsageCount()
welcomeMessage(); welcomeMessage();