Enhance stats
This commit is contained in:
parent
ec6e6be231
commit
f99abb0966
@ -18,6 +18,7 @@ import { EcrymeItem } from "./items/ecryme-item.js";
|
|||||||
import { EcrymeHotbar } from "./app/ecryme-hotbar.js"
|
import { EcrymeHotbar } from "./app/ecryme-hotbar.js"
|
||||||
import { EcrymeCharacterSummary } from "./app/ecryme-summary-app.js"
|
import { EcrymeCharacterSummary } from "./app/ecryme-summary-app.js"
|
||||||
import { ECRYME_CONFIG } from "./common/ecryme-config.js"
|
import { ECRYME_CONFIG } from "./common/ecryme-config.js"
|
||||||
|
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
@ -83,32 +84,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 */
|
/* Foundry VTT Initialization */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -123,7 +98,7 @@ Hooks.once("ready", function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
registerUsageCount(game.system.id)
|
ClassCounter.registerUsageCount()
|
||||||
welcomeMessage();
|
welcomeMessage();
|
||||||
EcrymeUtility.ready()
|
EcrymeUtility.ready()
|
||||||
EcrymeCharacterSummary.ready()
|
EcrymeCharacterSummary.ready()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user