Gestion armes

This commit is contained in:
LeRatierBretonnien 2023-02-25 09:38:35 +01:00
parent 6d75c8532c
commit b2a9d8cb75
2 changed files with 21 additions and 20 deletions

View File

@ -27,7 +27,7 @@ import { MALEFICES_CONFIG } from "./malefices-config.js"
Hooks.once("init", async function () { Hooks.once("init", async function () {
console.log(`Initializing Malefices RPG`); console.log(`Initializing Malefices RPG`);
game.system.malefices = { game.system.malefices = {
config: MALEFICES_CONFIG, config: MALEFICES_CONFIG,
MaleficesHotbar MaleficesHotbar
@ -69,21 +69,22 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */ /* -------------------------------------------- */
function welcomeMessage() { function welcomeMessage() {
ChatMessage.create({ if (game.user.isGM) {
user: game.user.id, ChatMessage.create({
whisper: [game.user.id], user: game.user.id,
content: `<div id="welcome-message-malefices"><span class="rdd-roll-part"> whisper: [game.user.id],
<strong>Bienvenu dans Malefices, le JDR qui sent le souffre !</strong> content: `<div id="welcome-message-malefices"><span class="rdd-roll-part">
<p>Le Livre de Base de Maléfices v4 est nécessaire pour jouer : https://arkhane-asylum.fr/en/malefices/</p> <strong>Bienvenu dans Malefices, le JDR qui sent le souffre !</strong>
<p>Maléfices et un jeu de rôle publié par Arkhane Asylum Publishing, tout les droits leur appartiennent.</p> <p>Le Livre de Base de Maléfices v4 est nécessaire pour jouer : https://arkhane-asylum.fr/en/malefices/</p>
<p>Système développé par LeRatierBretonnien avec l'aide de la Dame du Lac et Malik, support sur le <a href="https://discord.gg/pPSDNJk">Discord FR de Foundry</a>.</p> <p>Maléfices et un jeu de rôle publié par Arkhane Asylum Publishing, tout les droits leur appartiennent.</p>
` }); <p>Système développé par LeRatierBretonnien avec l'aide de la Dame du Lac et Malik, support sur le <a href="https://discord.gg/pPSDNJk">Discord FR de Foundry</a>.</p>
<p>Commandes : /tirage pour le tirage des tarots et /resume pour le résumé des PJs` });
}
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
// Register world usage statistics // Register world usage statistics
function registerUsageCount( registerKey ) { function registerUsageCount(registerKey) {
if ( game.user.isGM ) { if (game.user.isGM) {
game.settings.register(registerKey, "world-key", { game.settings.register(registerKey, "world-key", {
name: "Unique world key", name: "Unique world key",
scope: "world", scope: "world",
@ -93,14 +94,14 @@ function registerUsageCount( registerKey ) {
}); });
let worldKey = game.settings.get(registerKey, "world-key") let worldKey = game.settings.get(registerKey, "world-key")
if ( worldKey == undefined || worldKey == "" ) { if (worldKey == undefined || worldKey == "") {
worldKey = randomID(32) worldKey = randomID(32)
game.settings.set(registerKey, "world-key", worldKey ) game.settings.set(registerKey, "world-key", worldKey)
} }
// Simple API counter // 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}"` 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({ //$.ajaxSetup({
//headers: { 'Access-Control-Allow-Origin': '*' } //headers: { 'Access-Control-Allow-Origin': '*' }
//}) //})
$.ajax(regURL) $.ajax(regURL)
} }
@ -119,7 +120,7 @@ Hooks.once("ready", function () {
user: game.user._id user: game.user._id
}); });
} }
// CSS patch for v9 // CSS patch for v9
if (game.version) { if (game.version) {
let sidebar = document.getElementById("sidebar"); let sidebar = document.getElementById("sidebar");
@ -130,7 +131,7 @@ Hooks.once("ready", function () {
welcomeMessage(); welcomeMessage();
MaleficesUtility.ready() MaleficesUtility.ready()
MaleficesUtility.init() MaleficesUtility.init()
MaleficesCharacterSummary.ready() MaleficesCharacterSummary.ready()
}) })

View File

@ -64,7 +64,7 @@
], ],
"title": "Maléfices, le Jeu de Rôle", "title": "Maléfices, le Jeu de Rôle",
"url": "https://www.uberwald.me/gitea/public/fvtt-malefices", "url": "https://www.uberwald.me/gitea/public/fvtt-malefices",
"version": "10.0.25", "version": "10.1.0",
"download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.25.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.1.0.zip",
"background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp" "background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp"
} }