Update metrics data
This commit is contained in:
		| @@ -18,6 +18,7 @@ import { BoLAdventureGenerator } from "./system/bol-adventure-generator.js" | ||||
| import { BoLCommands } from "./system/bol-commands.js" | ||||
| import { BoLCharacterSummary } from "./system/bol-character-summary.js" | ||||
| import { BoLRoll } from "./controllers/bol-rolls.js" | ||||
| import { ClassCounter} from "https://www.uberwald.me/fvtt_appcount/count-class-ready.js" | ||||
|  | ||||
| /* -------------------------------------------- */ | ||||
| Hooks.once('init', async function () { | ||||
| @@ -45,7 +46,7 @@ Hooks.once('init', async function () { | ||||
|     formula: "2d6+@attributes.mind.value+@aptitudes.init.value", | ||||
|     decimals: 2 | ||||
|   }; | ||||
|  | ||||
|    | ||||
|   // Define custom Entity classes | ||||
|   CONFIG.Actor.documentClass = BoLActor; | ||||
|   CONFIG.Item.documentClass = BoLItem; | ||||
| @@ -77,31 +78,6 @@ Hooks.once('init', async function () { | ||||
|  | ||||
| }); | ||||
|  | ||||
| /* -------------------------------------------- */ | ||||
| // 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) | ||||
|   } | ||||
| } | ||||
|  | ||||
| /* -------------------------------------------- */ | ||||
| function welcomeMessage() { | ||||
| @@ -124,7 +100,7 @@ Hooks.once('ready', async function () { | ||||
|   BoLUtility.ready() | ||||
|   BoLCharacterSummary.ready() | ||||
|  | ||||
|   registerUsageCount(game.system.id) | ||||
|   ClassCounter.registerUsageCount() | ||||
|  | ||||
|   welcomeMessage() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user