45 Commits

Author SHA1 Message Date
40b9d3a053 fix: merge conflict header 2024-12-03 13:15:56 +01:00
47206a8695 Merge branch 'master' into old-system 2024-12-03 13:13:47 +01:00
015c3e5181 feat: new version number 2024-12-02 19:03:07 +01:00
bde6ffca74 fix: schoolbag, strengths and trope question tab editor content block had height of 0px 2024-12-02 19:00:59 +01:00
6dc5149c3b css died 2024-10-07 10:03:34 +02:00
8f8a66c78a Update package.json 2024-09-27 21:36:49 +00:00
4af976cac7 Update system.json 2024-09-27 21:36:34 +00:00
efa4ac6457 Merge branch 'old-system' into 'master'
Fix NPCs

See merge request wintermyst/kidsonbrooms!7
2024-09-27 21:33:09 +00:00
c1a962e3b8 fix: magi die lucky break 2024-09-27 23:26:54 +02:00
2eac4210e6 fix: NPC sheet not being able to fetch roll data 2024-09-27 23:11:01 +02:00
5dfdd81d74 Update package.json 2024-09-26 12:09:19 +00:00
60c31993b0 Update system.json 2024-09-26 12:09:04 +00:00
1e105cfc41 Merge branch 'old-system' into 'master'
Old system

See merge request wintermyst/kidsonbrooms!6
2024-09-26 12:08:48 +00:00
f653eb2ef2 Old system 2024-09-26 12:08:48 +00:00
fbf7e826d0 fix: wrong links 2024-09-26 14:08:24 +02:00
beb4322917 chore: correct release note url 2024-09-26 14:00:01 +02:00
d18c52ac54 chore:update so future releases link to the correct manifest 2024-09-26 13:58:51 +02:00
21d17ba037 Merge branch 'master' into old-system 2024-09-26 13:56:56 +02:00
863236d478 JAVASCRIPT 2024-09-26 13:51:27 +02:00
34238b7dc9 gfd 2024-09-26 13:48:30 +02:00
ef50b84dba rg 2024-09-26 13:44:40 +02:00
6e69dd8681 dfgbhe 2024-09-26 13:42:11 +02:00
e83c7b8ee0 fff 2024-09-26 13:38:38 +02:00
aa7a951ae1 sdfg 2024-09-26 13:25:08 +02:00
004143280b jsjsjsjsjsjs 2024-09-26 12:48:40 +02:00
dcdd9af271 fuck js 2024-09-26 12:45:40 +02:00
bef8d4bf7e asd 2024-09-26 12:43:25 +02:00
0c670b82b6 Merge branch 'old-system' into 'master'
1.1.3

See merge request wintermyst/kidsonbrooms!5
2024-09-26 10:33:53 +00:00
428b82e388 1.1.3 2024-09-26 10:33:53 +00:00
917bd6456d Merge branch 'master' into 'old-system'
# Conflicts:
#   system.json
2024-09-26 10:32:49 +00:00
943e2c5185 fix: renamed links to sheets 2024-09-26 12:31:51 +02:00
c112950a3e fix: reupload template 2024-09-26 12:28:17 +02:00
0ad5baa341 chore update version and readme 2024-09-26 12:25:28 +02:00
b9b014d59f fix: typo 2024-09-26 00:48:12 +00:00
a514ad4367 fix: no compendium folder 2024-09-26 00:46:34 +00:00
1ec482a98f chore: fix name 2024-09-26 00:35:05 +00:00
cc49017b3f d 2024-09-24 19:37:22 +02:00
e928c253eb c 2024-09-24 19:35:44 +02:00
f81fcb6111 b 2024-09-24 19:34:17 +02:00
de8b7ec38a a 2024-09-24 19:31:35 +02:00
36a506b338 update depencies 2024-09-24 19:29:36 +02:00
2294addb8a fix typo 2024-09-24 19:25:17 +02:00
6fe30953cc a 2024-09-24 19:23:45 +02:00
90f4d79e48 Fix error 2024-09-24 19:22:58 +02:00
aff0d5ffbe Updated release workflow 2024-09-24 19:21:44 +02:00
14 changed files with 257 additions and 39 deletions

View File

@ -11,7 +11,7 @@ variables:
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}"
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}"
dry_run: true
@ -79,6 +79,6 @@ create-release:
url: "${MANIFEST_RELEASE_URL}"
filepath: "/${MANIFEST}"
- name: "$ZIPFILE"
url: "${ZIPFILE_PERMALINK_URL}"
url: "${ZIPFILE_RELEASE_URL}"
filepath: "/${ZIPFILE}"

View File

@ -162,72 +162,140 @@
}
.flex-group-center {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: center;
flex-direction: center;
-ms-flex-wrap: center;
flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
text-align: center;
}
.flex-group-left {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-start;
flex-direction: flex-start;
-ms-flex-wrap: center;
flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
text-align: left;
}
.flex-group-right {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-end;
flex-direction: flex-end;
-ms-flex-wrap: center;
flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
text-align: right;
}
.flexshrink {
-webkit-box-flex: 0;
-ms-flex: 0;
flex: 0;
}
.flex-between {
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.flexlarge {
-webkit-box-flex: 2;
-ms-flex: 2;
flex: 2;
}
.align-left {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-start;
flex-direction: flex-start;
-ms-flex-wrap: center;
flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
text-align: left;
}
.align-right {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-end;
flex-direction: flex-end;
-ms-flex-wrap: center;
flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
text-align: right;
}
.align-center {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: center;
flex-direction: center;
-ms-flex-wrap: center;
flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
text-align: center;
}
.right-align-input {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
margin-left: auto;
max-width: 260px;
@ -243,26 +311,47 @@
cursor: pointer;
}
.editor-container {
min-height: 200px; /* Adjust this value as needed */
}
/* Styles limited to kidsonbrooms sheets */
.kids-on-brooms .item-form {
font-family: "Roboto", sans-serif;
}
.kids-on-brooms .sheet-header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
align-items: stretch;
flex: 0 auto;
-webkit-box-flex: 0;
-ms-flex: 0 1 auto;
flex: 0 1 auto;
overflow: hidden;
margin-bottom: 10px;
height: 110px;
}
.kids-on-brooms .sheet-header .profile-img {
-webkit-box-flex: 0;
-ms-flex: 0 0 100px;
flex: 0 0 100px;
height: 100px;
margin-right: 10px;
}
.kids-on-brooms .sheet-header .header-fields {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
}
.kids-on-brooms .sheet-header h1.charname {
@ -281,7 +370,9 @@
border-radius: 10px;
}
.kids-on-brooms .sheet-tabs {
flex: 0;
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
}
.kids-on-brooms .sheet-body,
.kids-on-brooms .sheet-body .tab,
@ -295,8 +386,14 @@
padding: 0 8px;
}
.kids-on-brooms .selection-row {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
margin-bottom: 10px;
}
@ -307,6 +404,8 @@
height: 28px;
margin: 2px 0;
padding: 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: rgba(0, 0, 0, 0.05);
border: 2px groove #eeede0;
@ -320,6 +419,8 @@
font-weight: bold;
padding-left: 5px;
text-align: left;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.kids-on-brooms .items-list {
@ -336,7 +437,11 @@
padding: 0;
}
.kids-on-brooms .items-list .item {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 0 2px;
border-bottom: 1px solid #c9c7b8;
@ -345,11 +450,15 @@
border-bottom: none;
}
.kids-on-brooms .items-list .item .item-name {
-webkit-box-flex: 2;
-ms-flex: 2;
flex: 2;
margin: 0;
overflow: hidden;
font-size: 13px;
text-align: left;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
color: #191813;
}
@ -359,6 +468,8 @@
overflow-x: hidden;
}
.kids-on-brooms .items-list .item .item-name .item-image {
-webkit-box-flex: 0;
-ms-flex: 0 0 30px;
flex: 0 0 30px;
height: 30px;
background-size: 30px;
@ -366,8 +477,14 @@
margin-right: 5px;
}
.kids-on-brooms .items-list .item-controls {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-flex: 0;
-ms-flex: 0 0 100px;
flex: 0 0 100px;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
}
.kids-on-brooms .items-list .item-controls a {
@ -385,6 +502,8 @@
height: 28px;
margin: 2px 0;
padding: 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: rgba(0, 0, 0, 0.05);
border: 2px groove #eeede0;
@ -399,6 +518,8 @@
text-align: left;
}
.kids-on-brooms .item-formula {
-webkit-box-flex: 0;
-ms-flex: 0 0 200px;
flex: 0 0 200px;
padding: 0 8px;
}
@ -418,6 +539,4 @@
.kids-on-brooms .kids-on-brooms select:focus {
outline: none;
border-color: #8102dd;
}
/*# sourceMappingURL=kidsonbrooms.css.map */
}

View File

@ -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');
@ -71,7 +71,7 @@ function compileScss() {
/* ----------------------------------------- */
function watchUpdates() {
gulp.watch(SYSTEM_SCSS, css);
gulp.watch(SYSTEM_SCSS, compileScss);
}
@ -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));
@ -268,8 +268,8 @@ function publishToFoundry(done) {
const compMin = moduleManifest.compatibility.minimum;
const compVer = moduleManifest.compatibility.verified;
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 notes = `https://gitlab.com/${process.env.CI_PROJECT_NAMESPACE}/${process.env.CI_PROJECT_NAME}/-/tags/${process.env.CI_COMMIT_TAG}`;
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}/-/releases/${process.env.CI_COMMIT_TAG}`;
const dryRun = process.env.dry_run === 'true';
const authToken = process.env.FOUNDRY_API_KEY;
@ -281,7 +281,7 @@ function publishToFoundry(done) {
// Construct the payload
const payload = {
id: id,
id: "kidsonbrooms",
release: {
version: version,
manifest: manifest,
@ -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_version', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@ -308,9 +308,9 @@ function publishToFoundry(done) {
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(JSON.stringify(responseData, null, 2));
done();
@ -328,7 +328,7 @@ function publishToFoundry(done) {
function updateSystemJson(done) {
const ManifestPath = 'system.json';
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;

View File

@ -7,7 +7,7 @@ export class KidsOnBroomsActor extends Actor {
/**
* Override getRollData() that's supplied to rolls.
*/
getRollData() {
getRollDataPC() {
let data = { ...this.system };
// Wand bonuses
@ -18,6 +18,12 @@ export class KidsOnBroomsActor extends Actor {
return data;
}
getRollDataNPC() {
let data = { ...this.system};
return data;
}
_getWandBonus(type) {
const bonuses = {

View File

@ -42,6 +42,7 @@ Hooks.once('init', async function() {
decimals: 2
};
// Define custom Document classes
CONFIG.Actor.documentClass = KidsOnBroomsActor;
@ -104,12 +105,10 @@ Hooks.once('init', async function() {
}
});
// Preload Handlebars templates.
return preloadHandlebarsTemplates();
});
/***

View File

@ -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,9 @@ 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`;
}
/* -------------------------------------------- */
@ -40,8 +42,6 @@ async getData()
// Add roll data for TinyMCE editors.
context.rollData = context.actor.getRollData();
// Add roll data for TinyMCE editors.
context.rollData = context.actor.getRollData();
console.log(context);
@ -87,7 +87,16 @@ async getData()
if (dataset.roll) {
let label = dataset.label ? `${dataset.label}` : '';
// 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;
console.log(dataset.roll);
// Apply wood bonus if it matches the stat being rolled for

View File

@ -1,6 +1,6 @@
{
"name": "kidsonbrooms",
"version": "1.1.2",
"version": "1.1.5",
"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"

View File

@ -1,3 +1,5 @@
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

View File

@ -3,10 +3,15 @@
}
.sheet-header {
@include flexbox(row, wrap, flex-start); // Use a mixin for flexbox
flex: 0 auto;
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start; // Use a mixin for flexbox
flex: 0 1 auto;
overflow: hidden;
margin-bottom: 10px;
height: 110px;
.profile-img {
flex: 0 0 100px;
@ -38,7 +43,7 @@ div.editor-border {
}
.sheet-tabs {
flex: 0;
flex: 1;
}
.sheet-body,

View File

@ -14,6 +14,10 @@
@import 'global/flex';
@import 'global/base';
.editor-container {
min-height: 200px; /* Adjust this value as needed */
}
/* Styles limited to kidsonbrooms sheets */
.kids-on-brooms {
@import 'components/forms';

View File

@ -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.6",
"compatibility": {
"minimum": 12,
"verified": 12.331

68
template.json Normal file
View 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"]
}
}
}

View File

@ -43,10 +43,16 @@
</section>
</div>
{{!-- Schoolbag Tab --}}
<div class="tab features editor-border" data-group="primary" data-tab="schoolbag">
{{editor schoolbag target="system.schoolbag" engine="prosemirror" button=false collaborate=false editable=true}}
<div class="tab schoolbag" data-group="primary" data-tab="schoolbag">
{{!-- Schoolbag Tab --}}
<div class="tab features editor-border" data-group="primary" data-tab="schoolbag">
{{editor schoolbag target="system.schoolbag" engine="prosemirror" button=false collaborate=false editable=true}}
</div>
</div>
{{!-- Strengths Tab --}}
<div class="tab features editor-border" data-group="primary" data-tab="strengths">

View File

@ -25,7 +25,7 @@
<!-- Magic rolling and input -->
<Fieldset class="flexrow flex-group-center">
<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>
</span>
</Fieldset>