Enhance stats
This commit is contained in:
parent
e0df1f1ff5
commit
234bd44742
@ -18,6 +18,7 @@ import { MaleficesItem } from "./malefices-item.js";
|
|||||||
import { MaleficesHotbar } from "./malefices-hotbar.js"
|
import { MaleficesHotbar } from "./malefices-hotbar.js"
|
||||||
import { MaleficesCharacterSummary } from "./malefices-summary-app.js"
|
import { MaleficesCharacterSummary } from "./malefices-summary-app.js"
|
||||||
import { MALEFICES_CONFIG } from "./malefices-config.js"
|
import { MALEFICES_CONFIG } from "./malefices-config.js"
|
||||||
|
import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js"
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
@ -82,31 +83,6 @@ function welcomeMessage() {
|
|||||||
<p>Commandes : /tirage pour le tirage des tarots, /carte pour tirer une simple carte et /resume pour le résumé des PJs (MJ seulement)` });
|
<p>Commandes : /tirage pour le tirage des tarots, /carte pour tirer une simple carte et /resume pour le résumé des PJs (MJ seulement)` });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
|
||||||
// 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 */
|
||||||
@ -122,7 +98,7 @@ Hooks.once("ready", function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
registerUsageCount('fvtt-malefices')
|
ClassCounter.registerUsageCount();
|
||||||
welcomeMessage();
|
welcomeMessage();
|
||||||
MaleficesUtility.ready()
|
MaleficesUtility.ready()
|
||||||
MaleficesCharacterSummary.ready()
|
MaleficesCharacterSummary.ready()
|
||||||
|
Loading…
Reference in New Issue
Block a user