From 1ec482a98f5dd3ffa602c543f381cb8b58f14490 Mon Sep 17 00:00:00 2001 From: WinterMyst <22961076-wintermyst@users.noreply.gitlab.com> Date: Thu, 26 Sep 2024 00:35:05 +0000 Subject: [PATCH] chore: fix name --- module/helpers/templates.mjs | 8 ++++---- module/kidsonbrooms.mjs | 22 +++++++++++----------- package.json | 4 ++-- readme.md | 2 +- system.json | 2 +- templates/actor/actor-character-sheet.html | 6 +++--- templates/actor/actor-npc-sheet.html | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/module/helpers/templates.mjs b/module/helpers/templates.mjs index 63debb1..a96cd05 100644 --- a/module/helpers/templates.mjs +++ b/module/helpers/templates.mjs @@ -7,9 +7,9 @@ return loadTemplates([ // Actor partials. - "systems/kids-on-brooms/templates/actor/parts/actor-features.html", - "systems/kids-on-brooms/templates/actor/parts/actor-adversity.html", - "systems/kids-on-brooms/templates/actor/parts/actor-stats.html", - "systems/kids-on-brooms/templates/actor/parts/actor-npc-stats.html", + "systems/kidsonbrooms/templates/actor/parts/actor-features.html", + "systems/kidsonbrooms/templates/actor/parts/actor-adversity.html", + "systems/kidsonbrooms/templates/actor/parts/actor-stats.html", + "systems/kidsonbrooms/templates/actor/parts/actor-npc-stats.html", ]); }; diff --git a/module/kidsonbrooms.mjs b/module/kidsonbrooms.mjs index eb69120..31165ad 100644 --- a/module/kidsonbrooms.mjs +++ b/module/kidsonbrooms.mjs @@ -47,7 +47,7 @@ Hooks.once('init', async function() { // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); - Actors.registerSheet("kids-on-brooms", KidsOnBroomsActorSheet, { makeDefault: true }); + Actors.registerSheet("kidsonbrooms", KidsOnBroomsActorSheet, { makeDefault: true }); //If there is a new chat message that is a roll we add the adversity token controls Hooks.on("renderChatMessage", (message, html, messageData) => { @@ -67,7 +67,7 @@ Hooks.once('init', async function() { } // Check if the token has already been claimed -- Contigency if the button somehow activates again - if (message.getFlag("kids-on-brooms", "tokenClaimed")) { + if (message.getFlag("kidsonbrooms", "tokenClaimed")) { ui.notifications.warn("This adversity token has already been claimed."); return; } @@ -85,10 +85,10 @@ Hooks.once('init', async function() { // Update the message content tokenControls.update({ content: updatedContent }); // Set the flag on the chat message to indicate that the token has been claimed - tokenControls.setFlag("kids-on-brooms", "tokenClaimed", true); + tokenControls.setFlag("kidsonbrooms", "tokenClaimed", true); } else { // Emit a socket request to update the message to show that the token has been claimed - game.socket.emit('system.kids-on-brooms', { + game.socket.emit('system.kidsonbrooms', { action: "takeToken", messageID: message.id, actorID: actor.id, @@ -118,7 +118,7 @@ Hooks.once('init', async function() { * if a player wants to claim a token we will update the message since they do not have the permissions */ Hooks.once('ready', function() { - game.socket.on('system.kids-on-brooms', async (data) => { + game.socket.on('system.kidsonbrooms', async (data) => { console.log("Socket data received:", data); if (data.action === "spendTokens") { @@ -190,7 +190,7 @@ Hooks.once('ready', function() { // Update the message content tokenControls.update({ content: updatedContent }); // Set the flag on the chat message to indicate that the token has been claimed - tokenControls.setFlag("kids-on-brooms", "tokenClaimed", true); + tokenControls.setFlag("kidsonbrooms", "tokenClaimed", true); } }); }); @@ -277,7 +277,7 @@ async function _onSpendAdversityTokens(e, rollMessageId) { console.log(`Requesting to spend ${tokensToSpend} tokens for ${rollActor.name} by ${spendingPlayerActor.name} (cost: ${tokenCost})`); // Emit a socket request to spend tokens - game.socket.emit('system.kids-on-brooms', { + game.socket.emit('system.kidsonbrooms', { action: "spendTokens", rollActorId: rollActorId, spendingActorId: spendingPlayerActor.id, // Send the player's actor who is spending the tokens @@ -300,8 +300,8 @@ async function _updateRollMessage(rollMessageId, tokensToSpend, isPlayerOfActor) } // Retrieve current tokens spent from flags, or initialize to 0 if not found - let cumulativeTokensSpent = message.getFlag("kids-on-brooms", "tokensSpent") || 0; - let newTotal = message.getFlag("kids-on-brooms", "newRollTotal") || message.rolls[0].total; + let cumulativeTokensSpent = message.getFlag("kidsonbrooms", "tokensSpent") || 0; + let newTotal = message.getFlag("kidsonbrooms", "newRollTotal") || message.rolls[0].total; /*if(isPlayerOfActor) { @@ -312,10 +312,10 @@ async function _updateRollMessage(rollMessageId, tokensToSpend, isPlayerOfActor) }*/ cumulativeTokensSpent += tokensToSpend; newTotal += tokensToSpend; - await message.setFlag("kids-on-brooms", "newRollTotal", newTotal); + await message.setFlag("kidsonbrooms", "newRollTotal", newTotal); // Update the message's flags to store the cumulative tokens spent - await message.setFlag("kids-on-brooms", "tokensSpent", cumulativeTokensSpent); + await message.setFlag("kidsonbrooms", "tokensSpent", cumulativeTokensSpent); let newContent = ""; if(cumulativeTokensSpent === 1) { diff --git a/package.json b/package.json index cf17427..2b7f347 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "kids-on-brooms", + "name": "kidsonbrooms", "version": "1.1.0", "description": "CSS compiler for the Kids On Brooms system", "scripts": { @@ -22,7 +22,7 @@ "gulp-sass": "^5", "gulp-sourcemaps": "^2.6.5", "gulp-zip": "^5.0.1", - "kids-on-brooms": "file:", + "kidsonbrooms": "file:", "node-fetch": "^3.3.2" }, "devDependencies": { diff --git a/readme.md b/readme.md index e0141b6..8291a1a 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,3 @@ -The Kids On Brooms System Implemented in FoundryVTT, reupload from https://github.com/Singularity-Lathe-VTT/kids-on-brooms +The Kids On Brooms System Implemented in FoundryVTT To get support create a issue on this Repository \ No newline at end of file diff --git a/system.json b/system.json index 5311251..2b90c94 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "id": "kidsonbrooms", "title": "Kids on Brooms System", - "description": "The Kids on Brooms system for FoundryVTT! - Deprecated", + "description": "The Kids on Brooms system for FoundryVTT!", "version": "1.1.0", "compatibility": { "minimum": 12, diff --git a/templates/actor/actor-character-sheet.html b/templates/actor/actor-character-sheet.html index f549c89..120ff36 100644 --- a/templates/actor/actor-character-sheet.html +++ b/templates/actor/actor-character-sheet.html @@ -32,12 +32,12 @@