Count worlds instance
This commit is contained in:
parent
67b4070c27
commit
167a3d5894
@ -217,6 +217,28 @@ function messageDeBienvenue() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
// 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,
|
||||||
|
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
|
||||||
|
$.ajax(`https://jdr.lahiette.com/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.data.version}"`)
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -246,6 +268,7 @@ Hooks.once("ready", async function () {
|
|||||||
}
|
}
|
||||||
if (Misc.isUniqueConnectedGM()) {
|
if (Misc.isUniqueConnectedGM()) {
|
||||||
messageDeBienvenue();
|
messageDeBienvenue();
|
||||||
|
registerUsageCount( SYSTEM_RDD );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -282,6 +305,7 @@ async function migrationPngWebp_1_5_34() {
|
|||||||
let sidebar = document.getElementById("sidebar");
|
let sidebar = document.getElementById("sidebar");
|
||||||
sidebar.style.width = "min-content";
|
sidebar.style.width = "min-content";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user