Sync bol for module releas
All checks were successful
Release Creation / build (release) Successful in 53s
All checks were successful
Release Creation / build (release) Successful in 53s
This commit is contained in:
@ -12,8 +12,6 @@ import * as documents from "./module/documents/_module.mjs"
|
||||
import * as applications from "./module/applications/_module.mjs"
|
||||
|
||||
import { handleSocketEvent } from "./module/socket.mjs"
|
||||
import { Macros } from "./module/macros.mjs"
|
||||
import { setupTextEnrichers } from "./module/enrichers.mjs"
|
||||
import CthulhuEternalUtils from "./module/utils.mjs"
|
||||
|
||||
export class ClassCounter{static printHello(){console.log("Hello")}static sendJsonPostRequest(e,s){const t={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)};return fetch(e,t).then((e=>{if(!e.ok)throw new Error("La requête a échoué avec le statut "+e.status);return e.json()})).catch((e=>{throw console.error("Erreur envoi de la requête:",e),e}))}static registerUsageCount(e=game.system.id,s={}){if(game.user.isGM){game.settings.register(e,"world-key",{name:"Unique world key",scope:"world",config:!1,default:"",type:String});let t=game.settings.get(e,"world-key");null!=t&&""!=t&&"NONE"!=t&&"none"!=t.toLowerCase()||(t=foundry.utils.randomID(32),game.settings.set(e,"world-key",t));let a={name:e,system:game.system.id,worldKey:t,version:game.system.version,language:game.settings.get("core","language"),remoteAddr:game.data.addresses.remote,nbInstalledModules:game.modules.size,nbActiveModules:game.modules.filter((e=>e.active)).length,nbPacks:game.world.packs.size,nbUsers:game.users.size,nbScenes:game.scenes.size,nbActors:game.actors.size,nbPlaylist:game.playlists.size,nbTables:game.tables.size,nbCards:game.cards.size,optionsData:s,foundryVersion:`${game.release.generation}.${game.release.build}`};this.sendJsonPostRequest("https://www.uberwald.me/fvtt_appcount/count_post.php",a)}}}
|
||||
@ -86,22 +84,10 @@ Hooks.once("init", function () {
|
||||
// Activate socket handler
|
||||
game.socket.on(`system.${SYSTEM.id}`, handleSocketEvent)
|
||||
|
||||
setupTextEnrichers()
|
||||
CthulhuEternalUtils.registerSettings()
|
||||
CthulhuEternalUtils.registerHandlebarsHelpers()
|
||||
CthulhuEternalUtils.setupCSSRootVariables()
|
||||
|
||||
// Gestion des jets de dés depuis les journaux
|
||||
document.addEventListener("click", (event) => {
|
||||
const anchor = event.target.closest("a.ask-roll-journal")
|
||||
if (!anchor) return
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
const type = anchor.dataset.rollType
|
||||
const target = anchor.dataset.rollTarget
|
||||
const title = anchor.dataset.rollTitle
|
||||
})
|
||||
|
||||
console.info("CTHULHU ETERNAL | System Initialized")
|
||||
})
|
||||
|
||||
@ -120,15 +106,11 @@ function preLocalizeConfig() {
|
||||
|
||||
Hooks.once("ready", function () {
|
||||
console.info("CTHULHU ETERNAL | Ready")
|
||||
ClassCounter.registerUsageCount("fvtt-cthulhu-eternal", {})
|
||||
_showUserGuide()
|
||||
|
||||
/* Display the user guide */
|
||||
async function _showUserGuide() {
|
||||
if (game.user.isGM) {
|
||||
const newVer = game.system.version
|
||||
}
|
||||
if (game.user.isGM) {
|
||||
ClassCounter.registerUsageCount("fvtt-cthulhu-eternal", {})
|
||||
}
|
||||
preLocalizeConfig()
|
||||
|
||||
})
|
||||
|
||||
Hooks.on("renderChatMessage", (message, html, data) => {
|
||||
@ -154,9 +136,6 @@ Hooks.on("renderChatMessage", (message, html, data) => {
|
||||
}
|
||||
})
|
||||
|
||||
Hooks.on("updateSetting", async (setting, update, options, id) => {
|
||||
})
|
||||
|
||||
// Dice-so-nice Ready
|
||||
Hooks.once("diceSoNiceReady", (dice3d) => {
|
||||
configureDiceSoNice(dice3d)
|
||||
@ -169,18 +148,8 @@ Hooks.once("diceSoNiceReady", (dice3d) => {
|
||||
* Journal - open journal sheet
|
||||
*/
|
||||
Hooks.on("hotbarDrop", (bar, data, slot) => {
|
||||
if (["Actor", "Item", "JournalEntry", "roll", "rollDamage", "rollAttack"].includes(data.type)) {
|
||||
Macros.createCthulhuEternalMacro(data, slot);
|
||||
if (["Actor", "Item", "JournalEntry", "skill", "weapon"].includes(data.type)) {
|
||||
// TODO -> Manage this
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Register world usage statistics
|
||||
* @param {string} registerKey
|
||||
*/
|
||||
function registerWorldCount(registerKey) {
|
||||
if (game.user.isGM) {
|
||||
ClassCounter.registerUsageCount(game.system.id, {})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user