Various items fixes and enhancements

This commit is contained in:
2024-12-09 16:02:40 +01:00
parent 9775ec9fa1
commit 1de2927d93
51 changed files with 2102 additions and 574 deletions

View File

@ -48,7 +48,8 @@ Hooks.once("init", function () {
spell: models.LethalFantasySpell,
save: models.LethalFantasySave,
vulnerability: models.LethalFantasyVulnerability,
equipment: models.LethalFantasyEquipment
equipment: models.LethalFantasyEquipment,
miracle: models.LethalFantasyMiracle
}
// Register sheet application classes
@ -66,6 +67,7 @@ Hooks.once("init", function () {
Items.registerSheet("lethalFantasy", applications.LethalFantasyArmorSheet, { types: ["armor"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasyShieldSheet, { types: ["shield"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasyEquipmentSheet, { types: ["equipment"], makeDefault: true })
Items.registerSheet("lethalFantasy", applications.LethalFantasyMiracleSheet, { types: ["miracle"], makeDefault: true })
// Other Document Configuration
CONFIG.ChatMessage.documentClass = documents.LethalFantasyChatMessage
@ -193,8 +195,12 @@ Hooks.on("hotbarDrop", (bar, data, slot) => {
* Register world usage statistics
* @param {string} registerKey
*/
function registerWorldCount(registerKey) {
async function registerWorldCount(registerKey) {
if (game.user.isGM) {
ClassCounter.registerUsageCount(game.system.id, {})
try {
ClassCounter.registerUsageCount(game.system.id, {})
} catch {
console.log("No usage log ")
}
}
}
}