From 428b82e3883930aa4170e9ac3320bec0ac6f2083 Mon Sep 17 00:00:00 2001 From: WinterMyst <22961076-wintermyst@users.noreply.gitlab.com> Date: Thu, 26 Sep 2024 10:33:53 +0000 Subject: [PATCH 01/10] 1.1.3 --- module/sheets/actor-sheet.mjs | 4 +-- readme.md | 4 ++- system.json | 2 +- template.json | 68 +++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 template.json diff --git a/module/sheets/actor-sheet.mjs b/module/sheets/actor-sheet.mjs index 021f9d9..87e7f42 100644 --- a/module/sheets/actor-sheet.mjs +++ b/module/sheets/actor-sheet.mjs @@ -8,7 +8,7 @@ export class KidsOnBroomsActorSheet extends ActorSheet { static get defaultOptions() { return foundry.utils.mergeObject(super.defaultOptions, { - classes: ["kids-on-brooms", "sheet", "actor"], + classes: ["kidsonbrooms", "sheet", "actor"], width: 800, height: 800, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }] @@ -19,7 +19,7 @@ export class KidsOnBroomsActorSheet extends ActorSheet { get template() { console.log("template", this.actor) - return `systems/kids-on-brooms/templates/actor/actor-${this.actor.type}-sheet.html`; + return `systems/kidsonbrooms/templates/actor/actor-${this.actor.type}-sheet.html`; } /* -------------------------------------------- */ diff --git a/readme.md b/readme.md index 8291a1a..62948f4 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,5 @@ The Kids On Brooms System Implemented in FoundryVTT -To get support create a issue on this Repository \ No newline at end of file +To get support create a issue on this Repository or join my discord: + +https://discord.gg/4sTXjxs5Yv \ No newline at end of file diff --git a/system.json b/system.json index 533218a..984c56b 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "kidsonbrooms", "title": "Kids on Brooms System", "description": "The Kids on Brooms system for FoundryVTT!", - "version": "1.1.2", + "version": "1.1.3", "compatibility": { "minimum": 12, "verified": 12.331 diff --git a/template.json b/template.json new file mode 100644 index 0000000..10376e7 --- /dev/null +++ b/template.json @@ -0,0 +1,68 @@ +{ + "Actor": { + "types": ["character", "npc"], + "templates": { + "base": { + "stats": { + "fight": { + "value": "d4", + "stat": 0, + "magic": 0 + }, + "flight": { + "value": "d4", + "stat": 0, + "magic": 0 + }, + "brains": { + "value": "d4", + "stat": 0, + "magic": 0 + }, + "brawn": { + "value": "d4", + "stat": 0, + "magic": 0 + }, + "charm": { + "value": "d4", + "stat": 0, + "magic": 0 + }, + "grit": { + "value": "d4", + "stat": 0, + "magic": 0 + } + }, + "description": "" + } + }, + "character": { + "templates": ["base"], + "trope": "", + "age": "", + "pronouns": "", + "fear": "", + "motivation": "", + "grade":"", + "broom": { + "name": "", + "look": "", + "mechanicalbenifit": "" + }, + "wand": { + "wood": "", + "core": "" + }, + "animalfamiliar":"", + "schoolbag": "", + "adversityTokens": 0, + "tropequestions": "", + "strengths": "" + }, + "npc": { + "templates": ["base"] + } + } +} From bef8d4bf7e0deb38ca737fe53b68379ea45a6f19 Mon Sep 17 00:00:00 2001 From: Joscha Maier Date: Thu, 26 Sep 2024 12:43:25 +0200 Subject: [PATCH 02/10] asd --- gulpfile.js | 3 ++- package.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9bc1b0d..f1464fd 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,7 @@ const sourcemaps = require('gulp-sourcemaps'); const sass = require('gulp-sass')(require('sass')); const zip = require('gulp-zip'); const fs = require('fs'); -const fetch = import('node-fetch'); +const fetch = require('node-fetch'); const replace = require('gulp-replace'); const FormData = require('form-data'); @@ -260,6 +260,7 @@ async function uploadToPackageRegistry(done) { /* ----------------------------------------- */ function publishToFoundry(done) { + const fetch = (import('node-fetch')).default; const moduleManifestPath = 'system.json'; const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath)); diff --git a/package.json b/package.json index 07f5083..e5731dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kidsonbrooms", - "version": "1.1.2", + "version": "1.1.3", "description": "CSS compiler for the Kids On Brooms system", "scripts": { "build": "gulp build", @@ -23,7 +23,7 @@ "gulp-sourcemaps": "^2.6.5", "gulp-zip": "^5.0.1", "kidsonbrooms": "file:", - "node-fetch": "^3.3.2" + "node-fetch": "^2.7.0" }, "devDependencies": { "sass": "^1.79.1" From dcdd9af2717f04a236682a64886e8b0c1d5fcf2a Mon Sep 17 00:00:00 2001 From: Joscha Maier Date: Thu, 26 Sep 2024 12:45:40 +0200 Subject: [PATCH 03/10] fuck js --- gulpfile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index f1464fd..ab5de4c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -260,7 +260,6 @@ async function uploadToPackageRegistry(done) { /* ----------------------------------------- */ function publishToFoundry(done) { - const fetch = (import('node-fetch')).default; const moduleManifestPath = 'system.json'; const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath)); From 004143280bb4a72356cf137bbfb23b1b3b2a6362 Mon Sep 17 00:00:00 2001 From: Joscha Maier Date: Thu, 26 Sep 2024 12:48:40 +0200 Subject: [PATCH 04/10] jsjsjsjsjsjs --- gulpfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index ab5de4c..c9095db 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -259,7 +259,7 @@ async function uploadToPackageRegistry(done) { /* Publish to FoundryVTT /* ----------------------------------------- */ -function publishToFoundry(done) { +async function publishToFoundry(done) { const moduleManifestPath = 'system.json'; const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath)); @@ -299,7 +299,7 @@ function publishToFoundry(done) { } // Send the POST request to Foundry VTT API - const response = fetch('https://api.foundryvtt.com/_api/packages/release', { + const response = await fetch('https://api.foundryvtt.com/_api/packages/release', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -308,7 +308,7 @@ function publishToFoundry(done) { body: JSON.stringify(payload), }); - const responseData = response.json(); + const responseData = await response.json(); if (responseData.status === 'success') { console.log('Successfully published to Foundry VTT:'); From aa7a951ae1c7920f220b9710661166d5a367e356 Mon Sep 17 00:00:00 2001 From: Joscha Maier Date: Thu, 26 Sep 2024 13:25:08 +0200 Subject: [PATCH 05/10] sdfg --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index c9095db..32b6e3b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -299,7 +299,7 @@ async function publishToFoundry(done) { } // Send the POST request to Foundry VTT API - const response = await fetch('https://api.foundryvtt.com/_api/packages/release', { + const response = await fetch('https://api.foundryvtt.com/_api/packages/release_version', { method: 'POST', headers: { 'Content-Type': 'application/json', From e83c7b8ee095ea3d78ab302585a99313d0114fd6 Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Thu, 26 Sep 2024 13:38:38 +0200 Subject: [PATCH 06/10] fff --- gulpfile.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 32b6e3b..34a1ea0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -308,7 +308,12 @@ async function publishToFoundry(done) { body: JSON.stringify(payload), }); - const responseData = await response.json(); + let responseData; + if (contentType && contentType.includes('application/json')) { + responseData = await response.json(); + } else { + responseData = await response.text(); + } if (responseData.status === 'success') { console.log('Successfully published to Foundry VTT:'); From 6e69dd8681b831039d48525b9de2e65e4fe9685d Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Thu, 26 Sep 2024 13:42:11 +0200 Subject: [PATCH 07/10] dfgbhe --- gulpfile.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 34a1ea0..a058013 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -308,12 +308,7 @@ async function publishToFoundry(done) { body: JSON.stringify(payload), }); - let responseData; - if (contentType && contentType.includes('application/json')) { - responseData = await response.json(); - } else { - responseData = await response.text(); - } + const responseData = await response.text(); if (responseData.status === 'success') { console.log('Successfully published to Foundry VTT:'); From ef50b84dba2f53f742f98732d1bae3ba2e5014b9 Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Thu, 26 Sep 2024 13:44:40 +0200 Subject: [PATCH 08/10] rg --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index a058013..b43c5c8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -281,7 +281,7 @@ async function publishToFoundry(done) { // Construct the payload const payload = { - id: id, + id: "kidsonbrooms", release: { version: version, manifest: manifest, From 34238b7dc9cce485398962bf1e5f2d450dd5be02 Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Thu, 26 Sep 2024 13:48:30 +0200 Subject: [PATCH 09/10] gfd --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index b43c5c8..5938e46 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -310,7 +310,7 @@ async function publishToFoundry(done) { const responseData = await response.text(); - if (responseData.status === 'success') { + if (responseData.contains('success')) { console.log('Successfully published to Foundry VTT:'); console.log(JSON.stringify(responseData, null, 2)); done(); From 863236d47876ed417bc40255ab21a86651fe5cb3 Mon Sep 17 00:00:00 2001 From: WinterMyst Date: Thu, 26 Sep 2024 13:51:27 +0200 Subject: [PATCH 10/10] JAVASCRIPT --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 5938e46..d219d8d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -310,7 +310,7 @@ async function publishToFoundry(done) { const responseData = await response.text(); - if (responseData.contains('success')) { + if (responseData.includes('success')) { console.log('Successfully published to Foundry VTT:'); console.log(JSON.stringify(responseData, null, 2)); done();