chore: fix name
This commit is contained in:
		| @@ -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", | ||||
|   ]); | ||||
| }; | ||||
|   | ||||
| @@ -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) | ||||
|   { | ||||
|   | ||||
| @@ -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": { | ||||
|   | ||||
| @@ -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 | ||||
| @@ -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, | ||||
|   | ||||
| @@ -32,12 +32,12 @@ | ||||
|     <div class="tab features" data-group="primary" data-tab="features"> | ||||
|       <section class="grid grid-3col"> | ||||
|         <section class="main grid-span-2"> | ||||
|           {{> "systems/kids-on-brooms/templates/actor/parts/actor-features.html"}} | ||||
|           {{> "systems/kids-on-brooms/templates/actor/parts/actor-adversity.html"}} | ||||
|           {{> "systems/kidsonbrooms/templates/actor/parts/actor-features.html"}} | ||||
|           {{> "systems/kidsonbrooms/templates/actor/parts/actor-adversity.html"}} | ||||
|         </section> | ||||
|  | ||||
|         <aside class="sidebar"> | ||||
|           {{> "systems/kids-on-brooms/templates/actor/parts/actor-stats.html"}} | ||||
|           {{> "systems/kidsonbrooms/templates/actor/parts/actor-stats.html"}} | ||||
|            | ||||
|         </aside> | ||||
|  | ||||
|   | ||||
| @@ -28,7 +28,7 @@ | ||||
|  | ||||
|     {{!-- Owned Features Tab --}} | ||||
|     <div class="tab features" data-group="primary" data-tab="features"> | ||||
|       {{> "systems/kids-on-brooms/templates/actor/parts/actor-npc-stats.html"}} | ||||
|       {{> "systems/kidsonbrooms/templates/actor/parts/actor-npc-stats.html"}} | ||||
|     </div> | ||||
|   </section> | ||||
| </form> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user