Compare commits
40 Commits
Author | SHA1 | Date | |
---|---|---|---|
8f8a66c78a | |||
4af976cac7 | |||
efa4ac6457 | |||
c1a962e3b8 | |||
2eac4210e6 | |||
5dfdd81d74 | |||
60c31993b0 | |||
1e105cfc41 | |||
f653eb2ef2 | |||
fbf7e826d0 | |||
beb4322917 | |||
d18c52ac54 | |||
21d17ba037 | |||
863236d478 | |||
34238b7dc9 | |||
ef50b84dba | |||
6e69dd8681 | |||
e83c7b8ee0 | |||
aa7a951ae1 | |||
004143280b | |||
dcdd9af271 | |||
bef8d4bf7e | |||
0c670b82b6 | |||
428b82e388 | |||
917bd6456d | |||
943e2c5185 | |||
c112950a3e | |||
0ad5baa341 | |||
b9b014d59f | |||
a514ad4367 | |||
1ec482a98f | |||
cc49017b3f | |||
e928c253eb | |||
f81fcb6111 | |||
de8b7ec38a | |||
36a506b338 | |||
2294addb8a | |||
6fe30953cc | |||
90f4d79e48 | |||
aff0d5ffbe |
@ -11,7 +11,7 @@ variables:
|
|||||||
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}"
|
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${CI_PROJECT_NAME}/${CI_COMMIT_TAG}"
|
||||||
MANIFEST_RELEASE_URL: "${PACKAGE_REGISTRY_URL}/${MANIFEST}"
|
MANIFEST_RELEASE_URL: "${PACKAGE_REGISTRY_URL}/${MANIFEST}"
|
||||||
ZIPFILE_RELEASE_URL: "${PACKAGE_REGISTRY_URL}/${ZIPFILE}"
|
ZIPFILE_RELEASE_URL: "${PACKAGE_REGISTRY_URL}/${ZIPFILE}"
|
||||||
MANIFEST_PERMALINK_URL: "https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/releases/permalink/latest/downloads/${MANIFEST}"
|
MANIFEST_PERMALINK_URL: "https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/releases/${CI_COMMIT_TAG}/downloads/${MANIFEST}"
|
||||||
ZIPFILE_PERMALINK_URL: "https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/releases/${CI_COMMIT_TAG}/downloads/${ZIPFILE}"
|
ZIPFILE_PERMALINK_URL: "https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/releases/${CI_COMMIT_TAG}/downloads/${ZIPFILE}"
|
||||||
dry_run: true
|
dry_run: true
|
||||||
|
|
||||||
@ -79,6 +79,6 @@ create-release:
|
|||||||
url: "${MANIFEST_RELEASE_URL}"
|
url: "${MANIFEST_RELEASE_URL}"
|
||||||
filepath: "/${MANIFEST}"
|
filepath: "/${MANIFEST}"
|
||||||
- name: "$ZIPFILE"
|
- name: "$ZIPFILE"
|
||||||
url: "${ZIPFILE_PERMALINK_URL}"
|
url: "${ZIPFILE_RELEASE_URL}"
|
||||||
filepath: "/${ZIPFILE}"
|
filepath: "/${ZIPFILE}"
|
||||||
|
|
||||||
|
18
gulpfile.js
18
gulpfile.js
@ -4,7 +4,7 @@ const sourcemaps = require('gulp-sourcemaps');
|
|||||||
const sass = require('gulp-sass')(require('sass'));
|
const sass = require('gulp-sass')(require('sass'));
|
||||||
const zip = require('gulp-zip');
|
const zip = require('gulp-zip');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const fetch = import('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
const replace = require('gulp-replace');
|
const replace = require('gulp-replace');
|
||||||
const FormData = require('form-data');
|
const FormData = require('form-data');
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ async function uploadToPackageRegistry(done) {
|
|||||||
/* Publish to FoundryVTT
|
/* Publish to FoundryVTT
|
||||||
/* ----------------------------------------- */
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
function publishToFoundry(done) {
|
async function publishToFoundry(done) {
|
||||||
const moduleManifestPath = 'system.json';
|
const moduleManifestPath = 'system.json';
|
||||||
const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath));
|
const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath));
|
||||||
|
|
||||||
@ -268,8 +268,8 @@ function publishToFoundry(done) {
|
|||||||
const compMin = moduleManifest.compatibility.minimum;
|
const compMin = moduleManifest.compatibility.minimum;
|
||||||
const compVer = moduleManifest.compatibility.verified;
|
const compVer = moduleManifest.compatibility.verified;
|
||||||
const compMax = moduleManifest.compatibility.maximum;
|
const compMax = moduleManifest.compatibility.maximum;
|
||||||
const manifest = process.env.MANIFEST_RELEASE_URL || `https://gitlab.com/${process.env.CI_PROJECT_NAMESPACE}/${process.env.CI_PROJECT_NAME}/-/releases/${process.env.CI_COMMIT_TAG}/downloads/${moduleManifestPath}`;
|
const manifest = process.env.MANIFEST_PERMALINK_URL || `https://gitlab.com/${process.env.CI_PROJECT_NAMESPACE}/${process.env.CI_PROJECT_NAME}/-/releases/${process.env.CI_COMMIT_TAG}/downloads/${moduleManifestPath}`;
|
||||||
const notes = `https://gitlab.com/${process.env.CI_PROJECT_NAMESPACE}/${process.env.CI_PROJECT_NAME}/-/tags/${process.env.CI_COMMIT_TAG}`;
|
const notes = `https://gitlab.com/${process.env.CI_PROJECT_NAMESPACE}/${process.env.CI_PROJECT_NAME}/-/releases/${process.env.CI_COMMIT_TAG}`;
|
||||||
|
|
||||||
const dryRun = process.env.dry_run === 'true';
|
const dryRun = process.env.dry_run === 'true';
|
||||||
const authToken = process.env.FOUNDRY_API_KEY;
|
const authToken = process.env.FOUNDRY_API_KEY;
|
||||||
@ -281,7 +281,7 @@ function publishToFoundry(done) {
|
|||||||
|
|
||||||
// Construct the payload
|
// Construct the payload
|
||||||
const payload = {
|
const payload = {
|
||||||
id: id,
|
id: "kidsonbrooms",
|
||||||
release: {
|
release: {
|
||||||
version: version,
|
version: version,
|
||||||
manifest: manifest,
|
manifest: manifest,
|
||||||
@ -299,7 +299,7 @@ function publishToFoundry(done) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send the POST request to Foundry VTT API
|
// 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_version', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
@ -308,9 +308,9 @@ function publishToFoundry(done) {
|
|||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
});
|
});
|
||||||
|
|
||||||
const responseData = response.json();
|
const responseData = await response.text();
|
||||||
|
|
||||||
if (responseData.status === 'success') {
|
if (responseData.includes('success')) {
|
||||||
console.log('Successfully published to Foundry VTT:');
|
console.log('Successfully published to Foundry VTT:');
|
||||||
console.log(JSON.stringify(responseData, null, 2));
|
console.log(JSON.stringify(responseData, null, 2));
|
||||||
done();
|
done();
|
||||||
@ -328,7 +328,7 @@ function publishToFoundry(done) {
|
|||||||
function updateSystemJson(done) {
|
function updateSystemJson(done) {
|
||||||
const ManifestPath = 'system.json';
|
const ManifestPath = 'system.json';
|
||||||
const Manifest = JSON.parse(fs.readFileSync(ManifestPath));
|
const Manifest = JSON.parse(fs.readFileSync(ManifestPath));
|
||||||
const zipUrl = process.env.ZIPFILE_PERMALINK_URL || 'https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/kidsonbrooms.zip?inline=false';
|
const zipUrl = process.env.ZIPFILE_RELEASE_URL || 'https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/kidsonbrooms.zip?inline=false';
|
||||||
|
|
||||||
Manifest.download = zipUrl;
|
Manifest.download = zipUrl;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ export class KidsOnBroomsActor extends Actor {
|
|||||||
/**
|
/**
|
||||||
* Override getRollData() that's supplied to rolls.
|
* Override getRollData() that's supplied to rolls.
|
||||||
*/
|
*/
|
||||||
getRollData() {
|
getRollDataPC() {
|
||||||
let data = { ...this.system };
|
let data = { ...this.system };
|
||||||
|
|
||||||
// Wand bonuses
|
// Wand bonuses
|
||||||
@ -18,6 +18,12 @@ export class KidsOnBroomsActor extends Actor {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRollDataNPC() {
|
||||||
|
let data = { ...this.system};
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
_getWandBonus(type) {
|
_getWandBonus(type) {
|
||||||
const bonuses = {
|
const bonuses = {
|
||||||
|
@ -8,7 +8,7 @@ export class KidsOnBroomsActorSheet extends ActorSheet {
|
|||||||
static get defaultOptions()
|
static get defaultOptions()
|
||||||
{
|
{
|
||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["kids-on-brooms", "sheet", "actor"],
|
classes: ["kidsonbrooms", "sheet", "actor"],
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 800,
|
height: 800,
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }]
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "features" }]
|
||||||
@ -19,7 +19,7 @@ export class KidsOnBroomsActorSheet extends ActorSheet {
|
|||||||
get template()
|
get template()
|
||||||
{
|
{
|
||||||
console.log("template", this.actor)
|
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`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -40,8 +40,6 @@ async getData()
|
|||||||
|
|
||||||
// Add roll data for TinyMCE editors.
|
// Add roll data for TinyMCE editors.
|
||||||
context.rollData = context.actor.getRollData();
|
context.rollData = context.actor.getRollData();
|
||||||
// Add roll data for TinyMCE editors.
|
|
||||||
context.rollData = context.actor.getRollData();
|
|
||||||
|
|
||||||
|
|
||||||
console.log(context);
|
console.log(context);
|
||||||
@ -87,7 +85,16 @@ async getData()
|
|||||||
if (dataset.roll) {
|
if (dataset.roll) {
|
||||||
let label = dataset.label ? `${dataset.label}` : '';
|
let label = dataset.label ? `${dataset.label}` : '';
|
||||||
// Get the roll data and include wand bonuses
|
// Get the roll data and include wand bonuses
|
||||||
let rollData = this.actor.getRollData();
|
|
||||||
|
let rollData;
|
||||||
|
if(this.actor.type == "character") {
|
||||||
|
rollData = this.actor.getRollDataPC();
|
||||||
|
} else if (this.actor.type == "npc") {
|
||||||
|
rollData = this.actor.getRollDataNPC();
|
||||||
|
} else {
|
||||||
|
console.log("ERROR: UNKNOWN AUTHOR TYPE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
let totalBonus = 0;
|
let totalBonus = 0;
|
||||||
console.log(dataset.roll);
|
console.log(dataset.roll);
|
||||||
// Apply wood bonus if it matches the stat being rolled for
|
// Apply wood bonus if it matches the stat being rolled for
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kidsonbrooms",
|
"name": "kidsonbrooms",
|
||||||
"version": "1.1.2",
|
"version": "1.1.5",
|
||||||
"description": "CSS compiler for the Kids On Brooms system",
|
"description": "CSS compiler for the Kids On Brooms system",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
@ -23,7 +23,7 @@
|
|||||||
"gulp-sourcemaps": "^2.6.5",
|
"gulp-sourcemaps": "^2.6.5",
|
||||||
"gulp-zip": "^5.0.1",
|
"gulp-zip": "^5.0.1",
|
||||||
"kidsonbrooms": "file:",
|
"kidsonbrooms": "file:",
|
||||||
"node-fetch": "^3.3.2"
|
"node-fetch": "^2.7.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"sass": "^1.79.1"
|
"sass": "^1.79.1"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
The Kids On Brooms System Implemented in FoundryVTT
|
The Kids On Brooms System Implemented in FoundryVTT
|
||||||
|
|
||||||
To get support create a issue on this Repository
|
To get support create a issue on this Repository or join my discord:
|
||||||
|
|
||||||
|
https://discord.gg/4sTXjxs5Yv
|
@ -2,7 +2,7 @@
|
|||||||
"id": "kidsonbrooms",
|
"id": "kidsonbrooms",
|
||||||
"title": "Kids on Brooms System",
|
"title": "Kids on Brooms System",
|
||||||
"description": "The Kids on Brooms system for FoundryVTT!",
|
"description": "The Kids on Brooms system for FoundryVTT!",
|
||||||
"version": "1.1.2",
|
"version": "1.1.5",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": 12,
|
"minimum": 12,
|
||||||
"verified": 12.331
|
"verified": 12.331
|
||||||
|
68
template.json
Normal file
68
template.json
Normal file
@ -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"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -25,7 +25,7 @@
|
|||||||
<!-- Magic rolling and input -->
|
<!-- Magic rolling and input -->
|
||||||
<Fieldset class="flexrow flex-group-center">
|
<Fieldset class="flexrow flex-group-center">
|
||||||
<legend>Magic</legend>
|
<legend>Magic</legend>
|
||||||
<span class="ability-mod rollable" data-roll="1{{stat.value}}x+1d4+{{stat.stat}}" data-label="Magic Roll for {{key}}" data-key="{{key}}">
|
<span class="ability-mod rollable" data-roll="1{{stat.value}}x+1d4x+{{stat.stat}}" data-label="Magic Roll for {{key}}" data-key="{{key}}">
|
||||||
<i class="fas fa-dice-d20"></i>
|
<i class="fas fa-dice-d20"></i>
|
||||||
</span>
|
</span>
|
||||||
</Fieldset>
|
</Fieldset>
|
||||||
|
Reference in New Issue
Block a user