Compare commits

...

60 Commits

Author SHA1 Message Date
5337800f43 Merge branch 'master' of https://www.uberwald.me/gitea/uberwald/fvtt-never-stop-blowing-up 2024-12-10 20:45:10 +01:00
f30f6fa1c4 Update release 2024-12-10 20:44:44 +01:00
17bfec8f4e Actualiser readme.md 2024-12-10 20:43:04 +01:00
618fc98a16 Initial rework 2024-12-10 17:22:50 +01:00
2b9361d3bd Initial rework 2024-12-10 17:22:28 +01:00
WinterMyst
9b25cc053a Merge branch 'old-system' into 'master'
Old system

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

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

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

See merge request wintermyst/kidsonbrooms!5
2024-09-26 10:33:53 +00:00
WinterMyst
428b82e388 1.1.3 2024-09-26 10:33:53 +00:00
WinterMyst
917bd6456d Merge branch 'master' into 'old-system'
# Conflicts:
#   system.json
2024-09-26 10:32:49 +00:00
Joscha Maier
943e2c5185
fix: renamed links to sheets 2024-09-26 12:31:51 +02:00
Joscha Maier
c112950a3e
fix: reupload template 2024-09-26 12:28:17 +02:00
Joscha Maier
0ad5baa341
chore update version and readme 2024-09-26 12:25:28 +02:00
WinterMyst
46ecf27fa5 Update package.json 2024-09-26 00:54:23 +00:00
WinterMyst
34878dfd57 Update system.json 2024-09-26 00:53:58 +00:00
WinterMyst
86b3240616 Merge branch 'old-system' into 'master'
1.1.2

See merge request wintermyst/kidsonbrooms!4
2024-09-26 00:50:44 +00:00
WinterMyst
9f9b093d71 1.1.2 2024-09-26 00:50:43 +00:00
WinterMyst
b9b014d59f fix: typo 2024-09-26 00:48:12 +00:00
WinterMyst
a514ad4367 fix: no compendium folder 2024-09-26 00:46:34 +00:00
WinterMyst
1ec482a98f chore: fix name 2024-09-26 00:35:05 +00:00
josch
cc49017b3f d 2024-09-24 19:37:22 +02:00
josch
e928c253eb c 2024-09-24 19:35:44 +02:00
josch
f81fcb6111 b 2024-09-24 19:34:17 +02:00
josch
de8b7ec38a a 2024-09-24 19:31:35 +02:00
josch
36a506b338 update depencies 2024-09-24 19:29:36 +02:00
josch
2294addb8a fix typo 2024-09-24 19:25:17 +02:00
josch
6fe30953cc a 2024-09-24 19:23:45 +02:00
josch
90f4d79e48 Fix error 2024-09-24 19:22:58 +02:00
josch
aff0d5ffbe Updated release workflow 2024-09-24 19:21:44 +02:00
WinterMyst
cf66b7e128 Update .gitlab-ci.yml file 2024-09-23 20:53:27 +00:00
GitLab CI
928739218d Update .zip with new version 2024-09-23 20:50:39 +00:00
WinterMyst
520ebaeed0 Update .gitlab-ci.yml file 2024-09-23 20:46:41 +00:00
GitLab CI
b5c01caff2 Update .zip with new version 2024-09-23 20:45:43 +00:00
WinterMyst
f6efcd73e2 Update .gitlab-ci.yml file 2024-09-23 20:42:04 +00:00
24 changed files with 860 additions and 347 deletions

View File

@ -1,2 +0,0 @@
*
!.gitignore

View File

@ -1,11 +1,24 @@
image: ubuntu:latest
stages: stages:
- compile - build
- release - release
# Compile Job (runs on every commit) variables:
compile: MANIFEST: "system.json"
stage: compile ZIPFILE: "kidsonbrooms.zip"
image: ubuntu:latest 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/${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
# Build job
build:
stage: build
before_script: before_script:
# Install Node.js v21.x manually # Install Node.js v21.x manually
- apt-get update && apt-get install -y curl - apt-get update && apt-get install -y curl
@ -17,94 +30,55 @@ compile:
- gulp --version # Verify Gulp is installed - gulp --version # Verify Gulp is installed
script: script:
- npm install - npm install
- gulp compile - gulp build
only:
- branches
artifacts: artifacts:
paths: paths:
- kidsonbrooms.zip - kidsonbrooms.zip
expire_in: never - system.json
- packs/
only:
- branches
# Release Job (manually triggered with version) # Release job
release: release:
stage: release stage: release
image: ubuntu:latest rules:
- if: $CI_COMMIT_TAG
variables:
dry_run: "false"
before_script: before_script:
# Install necessary tools
- apt-get update && apt-get install -y curl jq git
# Install Node.js v21.x manually # Install Node.js v21.x manually
- apt-get update && apt-get install -y curl
- curl -fsSL https://deb.nodesource.com/setup_21.x | bash - - curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
- apt-get install -y nodejs - apt-get install -y nodejs
- node -v # Verify the correct Node.js version - node -v # Verify the correct Node.js version
# Install Gulp globally # Install Gulp globally
- npm install --global gulp-cli - npm install --global gulp-cli
- gulp --version # Verify Gulp is installed - gulp --version # Verify Gulp is installed
- git fetch --all
- git switch master
- git branch --set-upstream-to=origin/master master
script: script:
# Check if VERSION is provided
- |
if [ -z "$VERSION" ]; then
echo "Error: VERSION variable is required."
exit 1
fi
# Install dependencies and run Gulp release task
- npm install - npm install
- gulp release - gulp release
- grep '"download":' system.json # Create GitLab release
- git config --global user.name "GitLab CI" create-release:
- git config --global user.email "ci@gitlab.com" stage: release
- git add kidsonbrooms.zip image: registry.gitlab.com/gitlab-org/release-cli:latest
- git commit -m "Update .zip with new version" needs:
- git push "https://$CI_COMMITTER_USER_AND_TOKEN@gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git" HEAD:master - job: release
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Creating GitLab release for $CI_COMMIT_TAG"
release:
name: "$CI_COMMIT_TAG"
tag_name: "$CI_COMMIT_TAG"
description: "Release $CI_COMMIT_TAG of $CI_PROJECT_NAME."
assets:
links:
- name: "$MANIFEST"
url: "${MANIFEST_RELEASE_URL}"
filepath: "/${MANIFEST}"
- name: "$ZIPFILE"
url: "${ZIPFILE_RELEASE_URL}"
filepath: "/${ZIPFILE}"
# Create a release on GitLab
- |
export RELEASE_RESPONSE=$(curl --request POST \
--header "PRIVATE-TOKEN: ${GITLAB_PAT}" \
--header "Content-Type: application/json" \
--data '{
"name": "Release v'$VERSION'",
"tag_name": "v'$VERSION'",
"description": "Release v'$VERSION'",
"ref": "master",
"assets": {
"links": [
{
"name": "Download kidsonbrooms.zip",
"url": "https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/kidsonbrooms.zip?inline=false"
}
]
}
}' "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/releases")
# Publish the release to the Foundry API
- |
curl -X POST https://api.foundryvtt.com/_api/packages/release_version/ \
-H "Authorization: $FOUNDRY_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"id\": \"Your-Package-ID\",
\"release\": {
\"version\": \"$VERSION\",
\"manifest\": \"https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/system.json",
\"notes\": \"https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/releases/v$VERSION\",
\"compatibility\": {
\"minimum\": \"12.331\",
\"verified\": \"12.331\",
\"maximum\": \"\"
}
}
}"
only:
- master
when: manual
allow_failure: false
dependencies:
- compile
artifacts:
paths:
- kidsonbrooms.zip
expire_in: never

View File

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["../scss/kidsonbrooms.scss","../scss/global/_base.scss","../scss/global/_window.scss","../scss/utils/_typography.scss","../scss/global/_grid.scss","../scss/global/_flex.scss","../scss/utils/_mixins.scss","../scss/utils/_variables.scss","../scss/components/_forms.scss","../scss/utils/_colors.scss","../scss/components/_resource.scss","../scss/components/_items.scss","../scss/components/_effects.scss"],"names":[],"mappings":"AACQ;AASR;ACTQ;ACDR;EACE,aCDa;;;ADKb;EAEE;EACA;EACA;;;AERJ;EACE;EACA;EACA;EACA;;;AAKA;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;ACrBJ;ECkBE;EACA,gBDlBiB;ECmBjB,WDnByB;ECoBzB,iBAJkD;EAKlD,aALsE;EDftE;;;AAGF;ECaE;EACA,gBDbiB;ECcjB,WDd6B;ECe7B,iBAJkD;EAKlD,aALsE;EDVtE;;;AAGF;ECQE;EACA,gBDRiB;ECSjB,WDT2B;ECU3B,iBAJkD;EAKlD,aALsE;EDLtE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAIF;ECVE;EACA,gBDUiB;ECTjB,WDS6B;ECR7B,iBAJkD;EAKlD,aALsE;EDatE;;;AAGF;ECfE;EACA,gBDeiB;ECdjB,WDc2B;ECb3B,iBAJkD;EAKlD,aALsE;EDkBtE;;;AAGF;ECpBE;EACA,gBDoBiB;ECnBjB,WDmByB;EClBzB,iBAJkD;EAKlD,aALsE;EDuBtE;;;AAIF;EACE;EACA;EACA;;;AJ7CF;EACE,aMEW;;;ANEX;EAEE;EACA;EACA;;;ADIJ;AQhBA;EACE,aLDa;;AKIf;EFeE;EACA,gBEfiB;EFgBjB,WEhBsB;EFiBtB,iBEjB4B;EFkB5B,aALsE;EEZtE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKN;EACE;EACA;;AAGF;EACE;;AAGF;AAAA;AAAA;EAGE;;AAIA;EACE,YCnDM;;ADsDR;EACE;;AAKJ;EACE;EACA;EACA;EACA;;AEhEF;EACE;;ACAF;EACE;EACA;EACA;EACA;EACA;EACA,QJHc;EIId;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA,OFxBM;;AE2BN;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA,OFvDG;;AEyDH;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAMN;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA,QJrGc;EIsGd;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAKJ;EACE;EACA;;ACzHA;AAAA;AAAA;EAGE;EACA;EACA;EACA;;AAGF;EACE;;AAKJ;AAAA;AAAA;EAGE;EACA,cHVmB","file":"kidsonbrooms.css"}

View File

@ -5,6 +5,10 @@
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
} }
.window-app .window-content > * {
flex:0;
}
.rollable:hover, .rollable:focus { .rollable:hover, .rollable:focus {
color: #000; color: #000;
text-shadow: 0 0 10px rgb(146, 0, 225); text-shadow: 0 0 10px rgb(146, 0, 225);
@ -162,72 +166,140 @@
} }
.flex-group-center { .flex-group-center {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: center;
flex-direction: center; flex-direction: center;
-ms-flex-wrap: center;
flex-wrap: center; flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch; align-items: stretch;
text-align: center; text-align: center;
} }
.flex-group-left { .flex-group-left {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-start;
flex-direction: flex-start; flex-direction: flex-start;
-ms-flex-wrap: center;
flex-wrap: center; flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch; align-items: stretch;
text-align: left; text-align: left;
} }
.flex-group-right { .flex-group-right {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-end;
flex-direction: flex-end; flex-direction: flex-end;
-ms-flex-wrap: center;
flex-wrap: center; flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch; align-items: stretch;
text-align: right; text-align: right;
} }
.flexshrink { .flexshrink {
-webkit-box-flex: 0;
-ms-flex: 0;
flex: 0; flex: 0;
} }
.flex-between { .flex-between {
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between; justify-content: space-between;
} }
.flexlarge { .flexlarge {
-webkit-box-flex: 2;
-ms-flex: 2;
flex: 2; flex: 2;
} }
.align-left { .align-left {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-start;
flex-direction: flex-start; flex-direction: flex-start;
-ms-flex-wrap: center;
flex-wrap: center; flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch; align-items: stretch;
text-align: left; text-align: left;
} }
.align-right { .align-right {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: flex-end;
flex-direction: flex-end; flex-direction: flex-end;
-ms-flex-wrap: center;
flex-wrap: center; flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch; align-items: stretch;
text-align: right; text-align: right;
} }
.align-center { .align-center {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: center;
flex-direction: center; flex-direction: center;
-ms-flex-wrap: center;
flex-wrap: center; flex-wrap: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start; justify-content: flex-start;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch; align-items: stretch;
text-align: center; text-align: center;
} }
.right-align-input { .right-align-input {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1; flex: 1;
margin-left: auto; margin-left: auto;
max-width: 260px; max-width: 260px;
@ -243,86 +315,121 @@
cursor: pointer; cursor: pointer;
} }
.editor-container {
min-height: 200px; /* Adjust this value as needed */
}
/* Styles limited to kidsonbrooms sheets */ /* Styles limited to kidsonbrooms sheets */
.kids-on-brooms .item-form { .fvtt-never-stop-blowing-up .item-form {
font-family: "Roboto", sans-serif; font-family: "Roboto", sans-serif;
} }
.kids-on-brooms .sheet-header {
.fvtt-never-stop-blowing-up .sheet-header {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row; flex-direction: row;
-ms-flex-wrap: wrap;
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; justify-content: flex-start;
align-items: stretch; -webkit-box-flex: 0;
flex: 0 auto; -ms-flex: 0 1 auto;
flex: 0 1 auto;
overflow: hidden; overflow: hidden;
margin-bottom: 10px; margin-bottom: 10px;
height: 110px;
} }
.kids-on-brooms .sheet-header .profile-img {
.fvtt-never-stop-blowing-up .sheet-header .profile-img {
-webkit-box-flex: 0;
-ms-flex: 0 0 100px;
flex: 0 0 100px; flex: 0 0 100px;
height: 100px; height: 100px;
margin-right: 10px; margin-right: 10px;
} }
.kids-on-brooms .sheet-header .header-fields { .fvtt-never-stop-blowing-up .sheet-header .header-fields {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1; flex: 1;
} }
.kids-on-brooms .sheet-header h1.charname { .fvtt-never-stop-blowing-up .sheet-header h1.charname {
height: 50px; height: 50px;
padding: 0; padding: 0;
margin: 5px 0; margin: 5px 0;
border-bottom: 0; border-bottom: 0;
} }
.kids-on-brooms .sheet-header h1.charname input { .fvtt-never-stop-blowing-up .sheet-header h1.charname input {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0; margin: 0;
} }
.kids-on-brooms div.editor-border { .fvtt-never-stop-blowing-up div.editor-border {
border: 2px solid rgb(81, 81, 81); border: 2px solid rgb(81, 81, 81);
border-radius: 10px; border-radius: 10px;
} }
.kids-on-brooms .sheet-tabs { .fvtt-never-stop-blowing-up .sheet-tabs {
flex: 0; -webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
} }
.kids-on-brooms .sheet-body, .fvtt-never-stop-blowing-up .sheet-body,
.kids-on-brooms .sheet-body .tab, .fvtt-never-stop-blowing-up .sheet-body .tab,
.kids-on-brooms .sheet-body .tab .editor { .fvtt-never-stop-blowing-up .sheet-body .tab .editor {
height: 100%; height: 100%;
} }
.kids-on-brooms .tox .tox-editor-container { .fvtt-never-stop-blowing-up .tox .tox-editor-container {
background: #fff; background: #fff;
} }
.kids-on-brooms .tox .tox-edit-area { .fvtt-never-stop-blowing-up .tox .tox-edit-area {
padding: 0 8px; padding: 0 8px;
} }
.kids-on-brooms .selection-row { .fvtt-never-stop-blowing-up .selection-row {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between; justify-content: space-between;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.kids-on-brooms .resource-label { .fvtt-never-stop-blowing-up .resource-label {
font-weight: bold; font-weight: bold;
} }
.kids-on-brooms .items-header { .fvtt-never-stop-blowing-up .items-header {
height: 28px; height: 28px;
margin: 2px 0; margin: 2px 0;
padding: 0; padding: 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; align-items: center;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
border: 2px groove #eeede0; border: 2px groove #eeede0;
font-weight: bold; font-weight: bold;
} }
.kids-on-brooms .items-header > * { .fvtt-never-stop-blowing-up .items-header > * {
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
} }
.kids-on-brooms .items-header .item-name { .fvtt-never-stop-blowing-up .items-header .item-name {
font-weight: bold; font-weight: bold;
padding-left: 5px; padding-left: 5px;
text-align: left; text-align: left;
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
} }
.kids-on-brooms .items-list { .fvtt-never-stop-blowing-up .items-list {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -330,94 +437,112 @@
scrollbar-width: thin; scrollbar-width: thin;
color: #444; color: #444;
} }
.kids-on-brooms .items-list .item-list { .fvtt-never-stop-blowing-up .items-list .item-list {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.kids-on-brooms .items-list .item { .fvtt-never-stop-blowing-up .items-list .item {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; align-items: center;
padding: 0 2px; padding: 0 2px;
border-bottom: 1px solid #c9c7b8; border-bottom: 1px solid #c9c7b8;
} }
.kids-on-brooms .items-list .item:last-child { .fvtt-never-stop-blowing-up .items-list .item:last-child {
border-bottom: none; border-bottom: none;
} }
.kids-on-brooms .items-list .item .item-name { .fvtt-never-stop-blowing-up .items-list .item .item-name {
-webkit-box-flex: 2;
-ms-flex: 2;
flex: 2; flex: 2;
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
font-size: 13px; font-size: 13px;
text-align: left; text-align: left;
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
color: #191813; color: #191813;
} }
.kids-on-brooms .items-list .item .item-name h3, .kids-on-brooms .items-list .item .item-name h4 { .fvtt-never-stop-blowing-up .items-list .item .item-name h3, .fvtt-never-stop-blowing-up .items-list .item .item-name h4 {
margin: 0; margin: 0;
white-space: nowrap; white-space: nowrap;
overflow-x: hidden; overflow-x: hidden;
} }
.kids-on-brooms .items-list .item .item-name .item-image { .fvtt-never-stop-blowing-up .items-list .item .item-name .item-image {
-webkit-box-flex: 0;
-ms-flex: 0 0 30px;
flex: 0 0 30px; flex: 0 0 30px;
height: 30px; height: 30px;
background-size: 30px; background-size: 30px;
border: none; border: none;
margin-right: 5px; margin-right: 5px;
} }
.kids-on-brooms .items-list .item-controls { .fvtt-never-stop-blowing-up .items-list .item-controls {
display: -webkit-box;
display: -ms-flexbox;
display: flex; display: flex;
-webkit-box-flex: 0;
-ms-flex: 0 0 100px;
flex: 0 0 100px; flex: 0 0 100px;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end; justify-content: flex-end;
} }
.kids-on-brooms .items-list .item-controls a { .fvtt-never-stop-blowing-up .items-list .item-controls a {
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
margin: 0 6px; margin: 0 6px;
} }
.kids-on-brooms .items-list .item-prop { .fvtt-never-stop-blowing-up .items-list .item-prop {
text-align: center; text-align: center;
border-left: 1px solid #c9c7b8; border-left: 1px solid #c9c7b8;
border-right: 1px solid #c9c7b8; border-right: 1px solid #c9c7b8;
font-size: 12px; font-size: 12px;
} }
.kids-on-brooms .items-list .items-header { .fvtt-never-stop-blowing-up .items-list .items-header {
height: 28px; height: 28px;
margin: 2px 0; margin: 2px 0;
padding: 0; padding: 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; align-items: center;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
border: 2px groove #eeede0; border: 2px groove #eeede0;
font-weight: bold; font-weight: bold;
} }
.kids-on-brooms .items-list .items-header > * { .fvtt-never-stop-blowing-up .items-list .items-header > * {
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
} }
.kids-on-brooms .items-list .items-header .item-name { .fvtt-never-stop-blowing-up .items-list .items-header .item-name {
padding-left: 5px; padding-left: 5px;
text-align: left; text-align: left;
} }
.kids-on-brooms .item-formula { .fvtt-never-stop-blowing-up .item-formula {
-webkit-box-flex: 0;
-ms-flex: 0 0 200px;
flex: 0 0 200px; flex: 0 0 200px;
padding: 0 8px; padding: 0 8px;
} }
.kids-on-brooms .effects .item .effect-source, .fvtt-never-stop-blowing-up .effects .item .effect-source,
.kids-on-brooms .effects .item .effect-duration, .fvtt-never-stop-blowing-up .effects .item .effect-duration,
.kids-on-brooms .effects .item .effect-controls { .fvtt-never-stop-blowing-up .effects .item .effect-controls {
text-align: center; text-align: center;
border-left: 1px solid #c9c7b8; border-left: 1px solid #c9c7b8;
border-right: 1px solid #c9c7b8; border-right: 1px solid #c9c7b8;
font-size: 12px; font-size: 12px;
} }
.kids-on-brooms .effects .item .effect-controls { .fvtt-never-stop-blowing-up .effects .item .effect-controls {
border: none; border: none;
} }
.kids-on-brooms .kids-on-brooms input:focus, .fvtt-never-stop-blowing-up .fvtt-never-stop-blowing-up input:focus,
.kids-on-brooms .kids-on-brooms textarea:focus, .fvtt-never-stop-blowing-up .fvtt-never-stop-blowing-up textarea:focus,
.kids-on-brooms .kids-on-brooms select:focus { .fvtt-never-stop-blowing-up .fvtt-never-stop-blowing-up select:focus {
outline: none; outline: none;
border-color: #8102dd; border-color: #8102dd;
} }
/*# sourceMappingURL=kidsonbrooms.css.map */

View File

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["../scss/kidsonbrooms.scss","../scss/global/_base.scss","../scss/global/_window.scss","../scss/utils/_typography.scss","../scss/global/_grid.scss","../scss/global/_flex.scss","../scss/utils/_mixins.scss","../scss/utils/_variables.scss","../scss/components/_forms.scss","../scss/utils/_colors.scss","../scss/components/_resource.scss","../scss/components/_items.scss","../scss/components/_effects.scss"],"names":[],"mappings":"AACQ;AASR;ACTQ;ACDR;EACE,aCDa;;;ADKb;EAEE;EACA;EACA;;;AERJ;EACE;EACA;EACA;EACA;;;AAKA;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAZF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;ACrBJ;ECkBE;EACA,gBDlBiB;ECmBjB,WDnByB;ECoBzB,iBAJkD;EAKlD,aALsE;EDftE;;;AAGF;ECaE;EACA,gBDbiB;ECcjB,WDd6B;ECe7B,iBAJkD;EAKlD,aALsE;EDVtE;;;AAGF;ECQE;EACA,gBDRiB;ECSjB,WDT2B;ECU3B,iBAJkD;EAKlD,aALsE;EDLtE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAIF;ECVE;EACA,gBDUiB;ECTjB,WDS6B;ECR7B,iBAJkD;EAKlD,aALsE;EDatE;;;AAGF;ECfE;EACA,gBDeiB;ECdjB,WDc2B;ECb3B,iBAJkD;EAKlD,aALsE;EDkBtE;;;AAGF;ECpBE;EACA,gBDoBiB;ECnBjB,WDmByB;EClBzB,iBAJkD;EAKlD,aALsE;EDuBtE;;;AJtCF;EACE,aMEW;;;ANEX;EAEE;EACA;EACA;;;ADIJ;AQhBA;EACE,aLDa;;AKIf;EFeE;EACA,gBEfiB;EFgBjB,WEhBsB;EFiBtB,iBEjB4B;EFkB5B,aALsE;EEZtE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKN;EACE;EACA;;AAGF;EACE;;AAGF;AAAA;AAAA;EAGE;;AAIA;EACE,YCnDM;;ADsDR;EACE;;AEvDJ;EACE;;ACAF;EACE;EACA;EACA;EACA;EACA;EACA,QJHc;EIId;;AAEA;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA,OFxBM;;AE2BN;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAIF;EACE;EACA;EACA;EACA;EACA;EACA;EACA,OFvDG;;AEyDH;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAMN;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;EACA,QJrGc;EIsGd;;AAEA;EACE;EACA;;AAGF;EACE;EACA;;AAKJ;EACE;EACA;;ACzHA;AAAA;AAAA;EAGE;EACA;EACA;EACA;;AAGF;EACE;;AAKJ;AAAA;AAAA;EAGE;EACA,cHVmB","file":"test.css"}

View File

@ -3,6 +3,41 @@ const prefix = require('gulp-autoprefixer');
const sourcemaps = require('gulp-sourcemaps'); 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 fetch = require('node-fetch');
const replace = require('gulp-replace');
const FormData = require('form-data');
/* ----------------------------------------- */
/* Export Tasks
/* ----------------------------------------- */
exports.default = gulp.series(
compileScss,
watchUpdates
);
exports.build = gulp.series(
compileScss,
checkVersion,
ensureOutputDirExists,
packageCompendiums,
updateSystemJson,
zipRelease
);
exports.compile = gulp.series(
compileScss,
ensureOutputDirExists,
packageCompendiums,
);
exports.release = gulp.series(
exports.build,
uploadToPackageRegistry,
publishToFoundry
);
/* ----------------------------------------- */ /* ----------------------------------------- */
/* Compile Sass /* Compile Sass
@ -30,31 +65,15 @@ function compileScss() {
})) }))
.pipe(gulp.dest("./css")) .pipe(gulp.dest("./css"))
} }
const css = gulp.series(compileScss);
/* ----------------------------------------- */ /* ----------------------------------------- */
/* Watch Updates /* Watch Updates
/* ----------------------------------------- */ /* ----------------------------------------- */
function watchUpdates() { function watchUpdates() {
gulp.watch(SYSTEM_SCSS, css); gulp.watch(SYSTEM_SCSS, compileScss);
} }
/* ----------------------------------------- */
/* Export Tasks
/* ----------------------------------------- */
exports.default = gulp.series(
compileScss,
watchUpdates
);
exports.build = gulp.series(
compileScss
);
exports.compile = gulp.series(
compileScss
);
exports.css = css;
/* ----------------------------------------- */ /* ----------------------------------------- */
/* Zip Release /* Zip Release
@ -71,12 +90,249 @@ function zipRelease() {
'!./package.json', '!./package.json',
'!./scss/**/*', '!./scss/**/*',
'!./.github/**/*', '!./.github/**/*',
'!./.gitlab-ci.yml',
'!./README.md',
'!./compendiums/**/*',
'!./*.zip'
], { base: '.' }) ], { base: '.' })
.pipe(zip('kidsonbrooms.zip')) .pipe(zip('kidsonbrooms.zip'))
.pipe(gulp.dest('.')); .pipe(gulp.dest('.'));
} }
exports.release = gulp.series( /* ----------------------------------------- */
compileScss, /* Version Check
zipRelease /* ----------------------------------------- */
);
function checkVersion(done) {
const Manifest = JSON.parse(fs.readFileSync('system.json'));
const manifestVersion = Manifest.version;
const gitTag = process.env.CI_COMMIT_TAG;
if (gitTag && manifestVersion !== gitTag) {
console.error(`Version mismatch between tag (${gitTag}) and manifest (${manifestVersion})!`);
process.exit(1);
} else {
console.log(`Version check passed: ${manifestVersion}`);
done();
}
}
/* ----------------------------------------- */
/* Bundle Compendium
/* ----------------------------------------- */
const { exec } = require('child_process');
function packageCompendiums(done) {
const packsDir = './compendiums'; // Adjust to your compendium source directory
const outputDir = './packs';
const moduleId = 'kidsonbrooms'; // Replace with your actual module ID
// Read all subdirectories in the packsDir
if (!fs.existsSync(packsDir)) {
console.log(`Compendium directory ${packsDir} does not exist. Skipping packaging.`);
done();
return;
}
// Read all files and directories in the packsDir
fs.readdir(packsDir, (err, files) => {
if (err) {
console.error(`Error reading directory ${packsDir}: ${err}`);
process.exit(1);
}
// Filter to get only directories
const folders = files.filter(file => {
const fullPath = path.join(packsDir, file);
return fs.statSync(fullPath).isDirectory();
});
if (folders.length === 0) {
console.log(`No compendium folders found in ${packsDir}. Skipping packaging.`);
done();
return;
}
let completed = 0;
folders.forEach(folder => {
const packName = folder; // Use the folder name as the pack name
const inputPath = path.join(packsDir, folder);
const command = `npx fvtt package pack --type System --id ${moduleId} -n "${packName}" --in "${inputPath}" --out "${outputDir}" --yaml`;
exec(command, (err, stdout, stderr) => {
if (err) {
console.error(`Error packaging compendium ${packName}:\n${stderr}`);
process.exit(1);
} else {
console.log(`Compendium ${packName} packaged successfully.`);
console.log(stdout);
completed++;
// When all compendiums have been processed, call done()
if (completed === folders.length) {
done();
}
}
});
});
});
}
/* ----------------------------------------- */
/* Ensure Output Directory Exists
/* ----------------------------------------- */
function ensureOutputDirExists() {
const outputDir = './packs';
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir);
}
return Promise.resolve();
}
/* ----------------------------------------- */
/* Upload to Package Registry
/* ----------------------------------------- */
async function uploadToPackageRegistry(done) {
const manifestFile = 'system.json';
const zipFile = process.env.ZIPFILE || 'kidsonbrooms.zip';
const packageRegistryUrl = process.env.PACKAGE_REGISTRY_URL;
const ciJobToken = process.env.CI_JOB_TOKEN;
if (!packageRegistryUrl || !ciJobToken) {
console.error('PACKAGE_REGISTRY_URL or CI_JOB_TOKEN is not defined.');
process.exit(1);
}
try {
// Upload manifest file
const manifestUploadUrl = `${packageRegistryUrl}/${manifestFile}`;
console.log(`Uploading ${manifestFile} to ${manifestUploadUrl}`);
let response = await fetch(manifestUploadUrl, {
method: 'PUT',
headers: {
'JOB-TOKEN': ciJobToken,
'Content-Type': 'application/octet-stream',
},
body: fs.createReadStream(manifestFile),
});
if (response.ok) {
console.log(`Uploaded ${manifestFile} successfully.`);
} else {
console.error(`Failed to upload ${manifestFile}: ${response.statusText}`);
process.exit(1);
}
// Upload zip file
const zipUploadUrl = `${packageRegistryUrl}/${zipFile}`;
console.log(`Uploading ${zipFile} to ${zipUploadUrl}`);
response = await fetch(zipUploadUrl, {
method: 'PUT',
headers: {
'JOB-TOKEN': ciJobToken,
'Content-Type': 'application/octet-stream',
},
body: fs.createReadStream(zipFile),
});
if (response.ok) {
console.log(`Uploaded ${zipFile} successfully.`);
} else {
console.error(`Failed to upload ${zipFile}: ${response.statusText}`);
process.exit(1);
}
done();
} catch (error) {
console.error(`Error uploading files: ${error.message}`);
process.exit(1);
}
}
/* ----------------------------------------- */
/* Publish to FoundryVTT
/* ----------------------------------------- */
async function publishToFoundry(done) {
const moduleManifestPath = 'system.json';
const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath));
const id = moduleManifest.name;
const version = moduleManifest.version;
const compMin = moduleManifest.compatibility.minimum;
const compVer = moduleManifest.compatibility.verified;
const compMax = moduleManifest.compatibility.maximum;
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;
if (!authToken) {
console.error('Foundry VTT API authentication token (FOUNDRY_API_KEY) is not defined.');
process.exit(1);
}
// Construct the payload
const payload = {
id: "kidsonbrooms",
release: {
version: version,
manifest: manifest,
notes: notes,
compatibility: {
minimum: compMin,
verified: compVer,
maximum: compMax,
},
},
};
if (dryRun) {
payload['dry-run'] = true;
}
// Send the POST request to Foundry VTT API
const response = await fetch('https://api.foundryvtt.com/_api/packages/release_version', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: authToken,
},
body: JSON.stringify(payload),
});
const responseData = await response.text();
if (responseData.includes('success')) {
console.log('Successfully published to Foundry VTT:');
console.log(JSON.stringify(responseData, null, 2));
done();
} else {
console.error('Failed to publish to Foundry VTT:');
console.error(JSON.stringify(responseData, null, 2));
process.exit(1);
}
}
/* ----------------------------------------- */
/* Update systen.json with Download URL
/* ----------------------------------------- */
function updateSystemJson(done) {
const ManifestPath = 'system.json';
const Manifest = JSON.parse(fs.readFileSync(ManifestPath));
const zipUrl = process.env.ZIPFILE_RELEASE_URL || 'https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/kidsonbrooms.zip?inline=false';
Manifest.download = zipUrl;
fs.writeFileSync(ManifestPath, JSON.stringify(Manifest, null, 2));
console.log(`Updated module.json with download URL: ${zipUrl}`);
done();
}

Binary file not shown.

View File

@ -1,9 +1,9 @@
{ {
"KIDSONBROOMS.EffectCreate": "Create Effect", "NEVERSTOPBLOWINGUP.EffectCreate": "Create Effect",
"KIDSONBROOMS.EffectToggle": "Toggle Effect", "NEVERSTOPBLOWINGUP.EffectToggle": "Toggle Effect",
"KIDSONBROOMS.EffectEdit": "Edit Effect", "NEVERSTOPBLOWINGUP.EffectEdit": "Edit Effect",
"KIDSONBROOMS.EffectDelete": "Delete Effect", "NEVERSTOPBLOWINGUP.EffectDelete": "Delete Effect",
"KIDSONBROOMS.Add": "Add" "NEVERSTOPBLOWINGUP.Add": "Add"
} }

View File

@ -2,12 +2,12 @@
* Extend the base Actor document by defining a custom roll data structure which is ideal for the Simple system. * Extend the base Actor document by defining a custom roll data structure which is ideal for the Simple system.
* @extends {Actor} * @extends {Actor}
*/ */
export class KidsOnBroomsActor extends Actor { export class NeverStopBlowingUpActor 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
@ -19,6 +19,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 = {
"Wisteria": { stat: "brains", bonus: 1 }, "Wisteria": { stat: "brains", bonus: 1 },

View File

@ -1,7 +1,7 @@
export const KIDSONBROOMS = {}; export const NEVERSTOPBLOWINGUP = {};
// Define constants here, such as: // Define constants here, such as:
KIDSONBROOMS.foobar = { NEVERSTOPBLOWINGUP.foobar = {
'bas': 'KIDSONBROOMS.bas', 'bas': 'NEVERSTOPBLOWINGUP.bas',
'bar': 'KIDSONBROOMS.bar' 'bar': 'NEVERSTOPBLOWINGUP.bar'
}; };

View File

@ -7,9 +7,9 @@
return loadTemplates([ return loadTemplates([
// Actor partials. // Actor partials.
"systems/kids-on-brooms/templates/actor/parts/actor-features.html", "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-features.html",
"systems/kids-on-brooms/templates/actor/parts/actor-adversity.html", "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-adversity.html",
"systems/kids-on-brooms/templates/actor/parts/actor-stats.html", "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-stats.html",
"systems/kids-on-brooms/templates/actor/parts/actor-npc-stats.html", "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-npc-stats.html",
]); ]);
}; };

View File

@ -1,12 +1,12 @@
// Import document classes. // Import document classes.
import { KidsOnBroomsActor } from "./documents/actor.mjs"; import { NeverStopBlowingUpActor } from "./documents/actor.mjs";
// Import sheet classes. // Import sheet classes.
import { KidsOnBroomsActorSheet } from "./sheets/actor-sheet.mjs"; import { NeverStopBlowingUpActorSheet } from "./sheets/actor-sheet.mjs";
// Import helper/utility classes and constants. // Import helper/utility classes and constants.
import { preloadHandlebarsTemplates } from "./helpers/templates.mjs"; import { preloadHandlebarsTemplates } from "./helpers/templates.mjs";
import { KIDSONBROOMS } from "./helpers/config.mjs"; import { NEVERSTOPBLOWINGUP } from "./helpers/config.mjs";
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Init Hook */ /* Init Hook */
@ -25,13 +25,13 @@ Hooks.once('init', async function() {
// Add utility classes and functions to the global game object so that they're more easily // Add utility classes and functions to the global game object so that they're more easily
// accessible in global contexts. // accessible in global contexts.
game.kidsonbrooms = { game.kidsonbrooms = {
KidsOnBroomsActor, NeverStopBlowingUpActor,
_onTakeAdversityToken: _onTakeAdversityToken, // Add the function to the global object _onTakeAdversityToken: _onTakeAdversityToken, // Add the function to the global object
_onSpendAdversityTokens: _onSpendAdversityTokens // Add the function to the global object _onSpendAdversityTokens: _onSpendAdversityTokens // Add the function to the global object
}; };
// Add custom constants for configuration. // Add custom constants for configuration.
CONFIG.KIDSONBROOMS = KIDSONBROOMS; CONFIG.NEVERSTOPBLOWINGUP = NEVERSTOPBLOWINGUP;
/** /**
* Set an initiative formula for the system * Set an initiative formula for the system
@ -42,12 +42,13 @@ Hooks.once('init', async function() {
decimals: 2 decimals: 2
}; };
// Define custom Document classes // Define custom Document classes
CONFIG.Actor.documentClass = KidsOnBroomsActor; CONFIG.Actor.documentClass = NeverStopBlowingUpActor;
// Register sheet application classes // Register sheet application classes
Actors.unregisterSheet("core", ActorSheet); Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("kids-on-brooms", KidsOnBroomsActorSheet, { makeDefault: true }); Actors.registerSheet("fvtt-never-stop-blowing-up", NeverStopBlowingUpActorSheet, { makeDefault: true });
//If there is a new chat message that is a roll we add the adversity token controls //If there is a new chat message that is a roll we add the adversity token controls
Hooks.on("renderChatMessage", (message, html, messageData) => { Hooks.on("renderChatMessage", (message, html, messageData) => {
@ -67,7 +68,7 @@ Hooks.once('init', async function() {
} }
// Check if the token has already been claimed -- Contigency if the button somehow activates again // 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."); ui.notifications.warn("This adversity token has already been claimed.");
return; return;
} }
@ -85,10 +86,10 @@ Hooks.once('init', async function() {
// Update the message content // Update the message content
tokenControls.update({ content: updatedContent }); tokenControls.update({ content: updatedContent });
// Set the flag on the chat message to indicate that the token has been claimed // Set the flag on the chat message to indicate that the token has been claimed
tokenControls.setFlag("kids-on-brooms", "tokenClaimed", true); tokenControls.setFlag("fvtt-never-stop-blowing-up", "tokenClaimed", true);
} else { } else {
// Emit a socket request to update the message to show that the token has been claimed // 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.fvtt-never-stop-blowing-up', {
action: "takeToken", action: "takeToken",
messageID: message.id, messageID: message.id,
actorID: actor.id, actorID: actor.id,
@ -104,12 +105,10 @@ Hooks.once('init', async function() {
} }
}); });
// Preload Handlebars templates. // Preload Handlebars templates.
return preloadHandlebarsTemplates(); return preloadHandlebarsTemplates();
}); });
/*** /***
@ -118,7 +117,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 * if a player wants to claim a token we will update the message since they do not have the permissions
*/ */
Hooks.once('ready', function() { Hooks.once('ready', function() {
game.socket.on('system.kids-on-brooms', async (data) => { game.socket.on('system.fvtt-never-stop-blowing-up', async (data) => {
console.log("Socket data received:", data); console.log("Socket data received:", data);
if (data.action === "spendTokens") { if (data.action === "spendTokens") {
@ -190,7 +189,7 @@ Hooks.once('ready', function() {
// Update the message content // Update the message content
tokenControls.update({ content: updatedContent }); tokenControls.update({ content: updatedContent });
// Set the flag on the chat message to indicate that the token has been claimed // Set the flag on the chat message to indicate that the token has been claimed
tokenControls.setFlag("kids-on-brooms", "tokenClaimed", true); tokenControls.setFlag("fvtt-never-stop-blowing-up", "tokenClaimed", true);
} }
}); });
}); });
@ -277,7 +276,7 @@ async function _onSpendAdversityTokens(e, rollMessageId) {
console.log(`Requesting to spend ${tokensToSpend} tokens for ${rollActor.name} by ${spendingPlayerActor.name} (cost: ${tokenCost})`); console.log(`Requesting to spend ${tokensToSpend} tokens for ${rollActor.name} by ${spendingPlayerActor.name} (cost: ${tokenCost})`);
// Emit a socket request to spend tokens // Emit a socket request to spend tokens
game.socket.emit('system.kids-on-brooms', { game.socket.emit('system.fvtt-never-stop-blowing-up', {
action: "spendTokens", action: "spendTokens",
rollActorId: rollActorId, rollActorId: rollActorId,
spendingActorId: spendingPlayerActor.id, // Send the player's actor who is spending the tokens spendingActorId: spendingPlayerActor.id, // Send the player's actor who is spending the tokens
@ -300,8 +299,8 @@ async function _updateRollMessage(rollMessageId, tokensToSpend, isPlayerOfActor)
} }
// Retrieve current tokens spent from flags, or initialize to 0 if not found // Retrieve current tokens spent from flags, or initialize to 0 if not found
let cumulativeTokensSpent = message.getFlag("kids-on-brooms", "tokensSpent") || 0; let cumulativeTokensSpent = message.getFlag("fvtt-never-stop-blowing-up", "tokensSpent") || 0;
let newTotal = message.getFlag("kids-on-brooms", "newRollTotal") || message.rolls[0].total; let newTotal = message.getFlag("fvtt-never-stop-blowing-up", "newRollTotal") || message.rolls[0].total;
/*if(isPlayerOfActor) /*if(isPlayerOfActor)
{ {
@ -312,10 +311,10 @@ async function _updateRollMessage(rollMessageId, tokensToSpend, isPlayerOfActor)
}*/ }*/
cumulativeTokensSpent += tokensToSpend; cumulativeTokensSpent += tokensToSpend;
newTotal += tokensToSpend; newTotal += tokensToSpend;
await message.setFlag("kids-on-brooms", "newRollTotal", newTotal); await message.setFlag("fvtt-never-stop-blowing-up", "newRollTotal", newTotal);
// Update the message's flags to store the cumulative tokens spent // Update the message's flags to store the cumulative tokens spent
await message.setFlag("kids-on-brooms", "tokensSpent", cumulativeTokensSpent); await message.setFlag("fvtt-never-stop-blowing-up", "tokensSpent", cumulativeTokensSpent);
let newContent = ""; let newContent = "";
if(cumulativeTokensSpent === 1) if(cumulativeTokensSpent === 1)
{ {

View File

@ -2,13 +2,13 @@
* Extend the basic ActorSheet with some very simple modifications * Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet} * @extends {ActorSheet}
*/ */
export class KidsOnBroomsActorSheet extends ActorSheet { export class NeverStopBlowingUpActorSheet extends ActorSheet {
/** @override */ /** @override */
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: ["fvtt-never-stop-blowing-up", "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,9 @@ 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/fvtt-never-stop-blowing-up/templates/actor/actor-${this.actor.type}-sheet.html`;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -40,8 +42,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 +87,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

View File

@ -1,6 +1,6 @@
{ {
"name": "kids-on-brooms", "name": "kidsonbrooms",
"version": "2.0.0", "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",
@ -15,12 +15,15 @@
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"dependencies": { "dependencies": {
"form-data": "^4.0.0",
"gulp": "^5", "gulp": "^5",
"gulp-autoprefixer": "^8", "gulp-autoprefixer": "^8",
"gulp-replace": "^1.1.4",
"gulp-sass": "^5", "gulp-sass": "^5",
"gulp-sourcemaps": "^2.6.5", "gulp-sourcemaps": "^2.6.5",
"gulp-zip": "^5.0.1", "gulp-zip": "^5.0.1",
"kids-on-brooms": "file:" "kidsonbrooms": "file:",
"node-fetch": "^2.7.0"
}, },
"devDependencies": { "devDependencies": {
"sass": "^1.79.1" "sass": "^1.79.1"

View File

@ -1,3 +1,2 @@
The Kids On Brooms System Implemented in FoundryVTT, reupload from https://github.com/Singularity-Lathe-VTT/kids-on-brooms The Never Stop Blowing Up System Implemented in FoundryVTT
To get support create a issue on this Repository

View File

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

View File

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

View File

@ -1,24 +1,26 @@
{ {
"id": "kidsonbrooms", "id": "fvtt-never-stop-blowing-up",
"title": "Kids on Brooms System", "title": "Never Stop Blowing Up",
"description": "The Kids on Brooms system for FoundryVTT! - Deprecated", "description": "The Never Stop Blowing Up system for FoundryVTT!",
"version": "1.1.0", "version": "12.0.0",
"compatibility": { "compatibility": {
"minimum": 12, "minimum": 12,
"verified": 12 "verified": 12
}, },
"authors": [{ "authors": [{
"name": "Joscha Maier" "name": "Joscha Maier"
},{
"name": "LeRatierBretonnien"
}], }],
"esmodules": ["module/kidsonbrooms.mjs"], "esmodules": ["module/never-stop-blowing-up.mjs"],
"styles": ["css/kidsonbrooms.css"], "styles": ["css/never-stop-blowing-up.css"],
"socket": true, "socket": true,
"grid": { "grid": {
"distance": 5, "distance": 5,
"units": "ft" "units": "ft"
}, },
"primaryTokenAttribute": "system.adversityTokens", "primaryTokenAttribute": "system.adversityTokens",
"url": "https://gitlab.com/wintermyst/kidsonbrooms", "url": "https://www.uberwald.me/gitea/uberwald/fvtt-never-stop-blowing-up",
"manifest": "https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/system.json", "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-never-stop-blowing-up/raw/branch/master/system.json",
"download": "https://gitlab.com/wintermyst/kidsonbrooms/-/raw/master/kidsonbrooms.zip?inline=false" "download": "https://www.uberwald.me/gitea/uberwald/fvtt-never-stop-blowing-up/archive/12.0.0.zip"
} }

103
template.json Normal file
View File

@ -0,0 +1,103 @@
{
"Actor": {
"types": ["character", "npc"],
"templates": {
"base": {
"stats": {
"stat1": {
"name": "fight",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat2": {
"name": "flight",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat3": {
"name": "brains",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat4": {
"name": "brawn",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat5": {
"name": "charm",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat6": {
"name": "grit",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat7": {
"name": "N/A",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat8": {
"name": "N/A",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat9": {
"name": "N/A",
"value": "d4",
"stat": 0,
"magic": 0
},
"stat10": {
"name": "N/A",
"value": "d4",
"stat": 0,
"magic": 0
}
},
"description": ""
}
},
"character": {
"templates": ["base"],
"wounds": {
"minor": {"m1": false, "m2": false, "m3": false},
"moderate": {"m1": false, "m2": false},
"mortal": {"m1": false}
},
"trope": "",
"age": "",
"pronouns": "",
"fear": "",
"motivation": "",
"grade":"",
"broom": {
"name": "",
"look": "",
"mechanicalbenifit": ""
},
"wand": {
"wood": "",
"core": ""
},
"animalfamiliar":"",
"schoolbag": "",
"adversityTokens": 0,
"tropequestions": "",
"strengths": ""
},
"npc": {
"templates": ["base"]
}
}
}

View File

@ -7,7 +7,7 @@
<div class="resources grid"> <div class="resources grid">
<div class="resource flex-group-center"> <div class="resource flex-group-center">
<label for="system.trope" class="resource-label">Trope</label> <label for="system.trope" class="resource-label">Class</label>
<div class="resource-content flexrow flex-center flex-between"> <div class="resource-content flexrow flex-center flex-between">
<input type="text" name="system.trope" value="{{system.trope}}" data-dtype="String"/> <input type="text" name="system.trope" value="{{system.trope}}" data-dtype="String"/>
</div> </div>
@ -20,9 +20,9 @@
<nav class="sheet-tabs tabs" data-group="primary"> <nav class="sheet-tabs tabs" data-group="primary">
{{!-- Default tab is specified in actor-sheet.mjs --}} {{!-- Default tab is specified in actor-sheet.mjs --}}
<a class="item" data-tab="features">Features</a> <a class="item" data-tab="features">Features</a>
<a class="item" data-tab="schoolbag">School Bag</a> <a class="item" data-tab="schoolbag">Inventory</a>
<a class="item" data-tab="strengths">Strengths</a> <a class="item" data-tab="strengths">Abilities</a>
<a class="item" data-tab="trope">Trope Questions</a> <!-- <a class="item" data-tab="trope">Trope Questions</a> -->
</nav> </nav>
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
@ -32,20 +32,23 @@
<div class="tab features" data-group="primary" data-tab="features"> <div class="tab features" data-group="primary" data-tab="features">
<section class="grid grid-3col"> <section class="grid grid-3col">
<section class="main grid-span-2"> <section class="main grid-span-2">
{{> "systems/kids-on-brooms/templates/actor/parts/actor-features.html"}} {{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-features.html"}}
{{> "systems/kids-on-brooms/templates/actor/parts/actor-adversity.html"}} {{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-adversity.html"}}
</section> </section>
<aside class="sidebar"> <aside class="sidebar">
{{> "systems/kids-on-brooms/templates/actor/parts/actor-stats.html"}} {{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-stats.html"}}
</aside> </aside>
</section> </section>
</div> </div>
{{!-- Schoolbag Tab --}}
<div class="tab features editor-border" data-group="primary" data-tab="schoolbag"> <div class="tab schoolbag" data-group="primary" data-tab="schoolbag">
{{editor schoolbag target="system.schoolbag" engine="prosemirror" button=false collaborate=false editable=true}} {{!-- 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> </div>
{{!-- Strengths Tab --}} {{!-- Strengths Tab --}}

View File

@ -28,7 +28,7 @@
{{!-- Owned Features Tab --}} {{!-- Owned Features Tab --}}
<div class="tab features" data-group="primary" data-tab="features"> <div class="tab features" data-group="primary" data-tab="features">
{{> "systems/kids-on-brooms/templates/actor/parts/actor-npc-stats.html"}} {{> "systems/fvtt-never-stop-blowing-up/templates/actor/parts/actor-npc-stats.html"}}
</div> </div>
</section> </section>
</form> </form>

View File

@ -1,49 +1,56 @@
<section class="grid grid-3col"> <section class="grid grid-3col">
<fieldset class="resource grid-span-3 flexcol"> <fieldset class="resource grid-span-3 flexcol">
<div class="resource flexrow"> <div class="resource grid-span-3 flexrow">
<label for="system.age" class="resource-label">Age</label> <label for="system.grade" class="resource-label">Species</label>
<input type="text" name="system.age" value="{{system.age}}" data-dtype="String"/> <input type="text" name="system.grade" value="{{system.grade}}" data-dtype="String" />
</div> </div>
<div class="resource grid-span-2 flexrow"> <div class="resource flexrow">
<label for="system.pronouns" class="resource-label">Pronouns</label> <label for="system.age" class="resource-label">Age</label>
<input type="text" name="system.pronouns" value="{{system.pronouns}}" data-dtype="String"/> <input type="text" name="system.age" value="{{system.age}}" data-dtype="String" />
</div> </div>
<div class="resource grid-span-3 flexrow"> <div class="resource grid-span-2 flexrow">
<label for="system.fear" class="resource-label">Fear</label> <label for="system.pronouns" class="resource-label">Pronouns</label>
<input type="text" name="system.fear" value="{{system.fear}}" data-dtype="String"/> <input type="text" name="system.pronouns" value="{{system.pronouns}}" data-dtype="String" />
</div> </div>
<div class="resource grid-span-3 flexrow" > <div class="resource grid-span-3 flexrow">
<label for="system.motivation" class="resource-label">Motivation</label> <label for="system.fear" class="resource-label">Fear</label>
<input type="text" name="system.motivation" value="{{system.motivation}}" data-dtype="String"/> <input type="text" name="system.fear" value="{{system.fear}}" data-dtype="String" />
</div> </div>
<div class="resource grid-span-3 flexrow" > <div class="resource grid-span-3 flexrow">
<label for="system.description" class="resource-label">Description</label> <label for="system.motivation" class="resource-label">Motivation</label>
<input type="text" name="system.description" value="{{system.description}}" data-dtype="String"/> <input type="text" name="system.motivation" value="{{system.motivation}}" data-dtype="String" />
</div> </div>
<div class="resource grid-span-3 flexrow"> <div class="resource grid-span-3 flexrow">
<label for="system.grade" class="resource-label">Grade</label> <label for="system.description" class="resource-label">Description</label>
<input type="text" name="system.grade" value="{{system.grade}}" data-dtype="String"/> <input type="text" name="system.description" value="{{system.description}}" data-dtype="String" />
</div> </div>
</fieldset> </fieldset>
<fieldset class="resource grid-span-3 flexcol">
<legend>Your Broom</legend> <!-- <fieldset class="resource grid-span-3 flexcol">
<legend>Your Broom</legend> -->
<!-- Broom Name Input with Dropdown --> <!-- Broom Name Input with Dropdown -->
<!--
<div class="resource flexrow"> <div class="resource flexrow">
<label for="broom-name" class="resource-label">Name</label> <label for="broom-name" class="resource-label">Name</label>
<input list="broomOptions" id="broom-name" name="system.broom.name" <input list="broomOptions" id="broom-name" name="system.broom.name" value="{{system.broom.name}}"
value="{{system.broom.name}}" data-dtype="String" placeholder="Select or Enter Broom Name" data-dtype="String" placeholder="Select or Enter Broom Name" oninput="updateBroomDetails()"
oninput="updateBroomDetails()" onblur="updateBroomDetails()"> onblur="updateBroomDetails()">
<datalist id="broomOptions"> <datalist id="broomOptions">
<option value="The Blocker's Broom" data-look="Defensive" data-mechanical="Gain the Guardian Strength"></option> <option value="The Blocker's Broom" data-look="Defensive" data-mechanical="Gain the Guardian Strength"></option>
<option value="Bolting 4000" data-look="Fast" data-mechanical="+1 to Flight checks"></option> <option value="Bolting 4000" data-look="Fast" data-mechanical="+1 to Flight checks"></option>
<option value="The Bruiser" data-look="Intense" data-mechanical="+1 to Fight checks"></option> <option value="The Bruiser" data-look="Intense" data-mechanical="+1 to Fight checks"></option>
<option value="Cunning Captains Cruiser" data-look="Natural Leader" data-mechanical="Treat Snap Decisions as Planned Actions unless facing fear"></option> <option value="Cunning Captains Cruiser" data-look="Natural Leader"
<option value="Daredevils Duster" data-look="Flashy" data-mechanical="+3 to Charm checks when performing a stunt"></option> data-mechanical="Treat Snap Decisions as Planned Actions unless facing fear"></option>
<option value="The Daring Dodger 3000" data-look="Ambitious" data-mechanical="Each Adversity Token adds +2 to your roll instead of +1"></option> <option value="Daredevils Duster" data-look="Flashy"
<option value="Heartwoods Helper" data-look="Outgoing" data-mechanical="Each successful check grants an ally one Adversity Token"></option> data-mechanical="+3 to Charm checks when performing a stunt"></option>
<option value="Mapmakers Friend" data-look="Level-Headed" data-mechanical="Cannot get lost if you know the area"></option> <option value="The Daring Dodger 3000" data-look="Ambitious"
data-mechanical="Each Adversity Token adds +2 to your roll instead of +1"></option>
<option value="Heartwoods Helper" data-look="Outgoing"
data-mechanical="Each successful check grants an ally one Adversity Token"></option>
<option value="Mapmakers Friend" data-look="Level-Headed"
data-mechanical="Cannot get lost if you know the area"></option>
<option value="The Masterminds Sweeper" data-look="Confident" data-mechanical="+1 to Brains checks"></option> <option value="The Masterminds Sweeper" data-look="Confident" data-mechanical="+1 to Brains checks"></option>
<option value="The Strong Sweep 2500" data-look="Strong" data-mechanical="+1 to Brawn checks"></option> <option value="The Strong Sweep 2500" data-look="Strong" data-mechanical="+1 to Brawn checks"></option>
<option value="The Suave Sweeper" data-look="Trustworthy" data-mechanical="+1 to Charm checks"></option> <option value="The Suave Sweeper" data-look="Trustworthy" data-mechanical="+1 to Charm checks"></option>
@ -52,104 +59,124 @@
<option value="Weasels Whisk" data-look="Sneaky" data-mechanical="Gain the Unassuming Strength"></option> <option value="Weasels Whisk" data-look="Sneaky" data-mechanical="Gain the Unassuming Strength"></option>
</datalist> </datalist>
</div> </div>
-->
<!-- Broom Look --> <!--
<div class="resource flexrow"> <div class="resource flexrow">
<label for="broom-look" class="resource-label">Look</label> <label for="broom-look" class="resource-label">Look</label>
<input type="text" id="broom-look" name="system.broom.look" <input type="text" id="broom-look" name="system.broom.look" value="{{system.broom.look}}" data-dtype="String" />
value="{{system.broom.look}}" data-dtype="String"/>
</div> </div>
<!-- Mechanical Benefit as Textarea -->
<div class="resource flexrow"> <div class="resource flexrow">
<label for="broom-mechanical" class="resource-label">Mechanical Benefit</label> <label for="broom-mechanical" class="resource-label">Mechanical Benefit</label>
<textarea id="broom-mechanical" name="system.broom.mechanicalbenefit" <textarea id="broom-mechanical" name="system.broom.mechanicalbenefit" data-dtype="String" rows="3"
data-dtype="String" rows="3" style="resize:none;"></textarea> style="resize:none;"></textarea>
</div> </div>
</fieldset> -->
</fieldset>
<script> <script>
function updateBroomDetails() { function updateBroomDetails() {
// Use a short delay to allow browser to properly handle the datalist input // Use a short delay to allow browser to properly handle the datalist input
setTimeout(function() { setTimeout(function () {
const broomNameInput = document.getElementById("broom-name").value.trim(); const broomNameInput = document.getElementById("broom-name").value.trim();
const broomOptions = document.querySelectorAll("#broomOptions option"); const broomOptions = document.querySelectorAll("#broomOptions option");
let selectedLook = ""; let selectedLook = "";
let selectedMechanical = ""; let selectedMechanical = "";
// Loop through the datalist options to find a matching broom name // Loop through the datalist options to find a matching broom name
broomOptions.forEach(option => { broomOptions.forEach(option => {
if (option.value.toLowerCase() === broomNameInput.toLowerCase()) { if (option.value.toLowerCase() === broomNameInput.toLowerCase()) {
selectedLook = option.getAttribute("data-look"); selectedLook = option.getAttribute("data-look");
selectedMechanical = option.getAttribute("data-mechanical"); selectedMechanical = option.getAttribute("data-mechanical");
} }
}); });
// Update the look and mechanical benefit fields if a predefined broom is selected // Update the look and mechanical benefit fields if a predefined broom is selected
document.getElementById("broom-look").value = selectedLook || ""; document.getElementById("broom-look").value = selectedLook || "";
document.getElementById("broom-mechanical").value = selectedMechanical || ""; document.getElementById("broom-mechanical").value = selectedMechanical || "";
}, 100); // Delay of 100 milliseconds }, 100); // Delay of 100 milliseconds
} }
</script> </script>
<fieldset class="resource grid-span-3 flexcol">
<legend>Wand Selection</legend>
<!-- Wood Selection --> <!--
<div class="resource-flexrow"> <fieldset class="resource grid-span-3 flexcol">
<label for="system.wand.wood" class="resource-label">Wood Type</label> <legend>Wand Selection</legend>
<input list="WoodOptions" id="wandWoodChoice" name="system.wand.wood" value="{{system.wand.wood}}" placeholder="Select Wood type"
oninput="updateWandWoodDetails()" onblur="updateWandWoodDetails()">
<datalist id="WoodOptions">
<option value="">Select Wood</option>
<option value="Wisteria">(Brains)</option>
<option value="Hawthorn">(Brains)</option>
<option value="Pine">(Brawn)</option>
<option value="Oak">(Brawn)</option>
<option value="Crabapple">(Fight)</option>
<option value="Dogwood">(Fight)</option>
<option value="Birch">(Flight)</option>
<option value="Bamboo">(Flight)</option>
<option value="Ironwood">(Grit)</option>
<option value="Maple">(Grit)</option>
<option value="Lilac">(Charm)</option>
<option value="Cherry">(Charm)</option>
</datalist>
</div>
<!-- Core Selection --> <div class="resource-flexrow">
<div class="resource-flexrow"> <label for="system.wand.wood" class="resource-label">Wood Type</label>
<label for="system.wand.core" class="resource-label">Core Type</label> <input list="WoodOptions" id="wandWoodChoice" name="system.wand.wood" value="{{system.wand.wood}}"
<input list="CoreOptions" id="wandCoreChoice" name="system.wand.core" value="{{system.wand.core}}" placeholder="Select Core type" placeholder="Select Wood type" oninput="updateWandWoodDetails()" onblur="updateWandWoodDetails()">
oninput="updateWandCoreDetails()" onblur="updateWandCoreDetails()"> <datalist id="WoodOptions">
<datalist id="CoreOptions"> <option value="">Select Wood</option>
<option value="">Select Core</option> <option value="Wisteria">(Brains)</option>
<option value="Parchment">(Brains)</option> <option value="Hawthorn">(Brains)</option>
<option value="Phoenix Feather">(Brains)</option> <option value="Pine">(Brawn)</option>
<option value="Owl Feather">(Brains)</option> <option value="Oak">(Brawn)</option>
<option value="Gorilla Fur">(Brawn)</option> <option value="Crabapple">(Fight)</option>
<option value="Ogres Fingernail">(Brawn)</option> <option value="Dogwood">(Fight)</option>
<option value="Hippos Tooth">(Brawn)</option> <option value="Birch">(Flight)</option>
<option value="Dragons Heartstring">(Fight)</option> <option value="Bamboo">(Flight)</option>
<option value="Wolfs Tooth">(Fight)</option> <option value="Ironwood">(Grit)</option>
<option value="Elks Antler">(Fight)</option> <option value="Maple">(Grit)</option>
<option value="Hawks Feather">(Flight)</option> <option value="Lilac">(Charm)</option>
<option value="Bats Bone">(Flight)</option> <option value="Cherry">(Charm)</option>
<option value="Changelings Hair">(Charm)</option> </datalist>
<option value="Gold">(Charm)</option> </div>
<option value="Mirror">(Charm)</option>
<option value="Steel">(Grit)</option> <div class="resource-flexrow">
<option value="Diamond">(Grit)</option> <label for="system.wand.core" class="resource-label">Core Type</label>
<option value="Lions Mane">(Grit)</option> <input list="CoreOptions" id="wandCoreChoice" name="system.wand.core" value="{{system.wand.core}}"
</datalist> placeholder="Select Core type" oninput="updateWandCoreDetails()" onblur="updateWandCoreDetails()">
</div> <datalist id="CoreOptions">
<option value="">Select Core</option>
<option value="Parchment">(Brains)</option>
<option value="Phoenix Feather">(Brains)</option>
<option value="Owl Feather">(Brains)</option>
<option value="Gorilla Fur">(Brawn)</option>
<option value="Ogres Fingernail">(Brawn)</option>
<option value="Hippos Tooth">(Brawn)</option>
<option value="Dragons Heartstring">(Fight)</option>
<option value="Wolfs Tooth">(Fight)</option>
<option value="Elks Antler">(Fight)</option>
<option value="Hawks Feather">(Flight)</option>
<option value="Bats Bone">(Flight)</option>
<option value="Changelings Hair">(Charm)</option>
<option value="Gold">(Charm)</option>
<option value="Mirror">(Charm)</option>
<option value="Steel">(Grit)</option>
<option value="Diamond">(Grit)</option>
<option value="Lions Mane">(Grit)</option>
</datalist>
</div>
</fieldset> </fieldset>
<fieldset class="resource grid-span-3 flexcol"> <fieldset class="resource grid-span-3 flexcol">
<legend>Animal Familiar</legend> <legend>Animal Familiar</legend>
<div class="resource grid-span-3 flexrow"> <div class="resource grid-span-3 flexrow">
<label for="system.animalfamiliar" class="resource-label">Animal Familiar</label> <label for="system.animalfamiliar" class="resource-label">Animal Familiar</label>
<input type="text" name="system.animalfamiliar" value="{{system.animalfamiliar}}" data-dtype="String"/> <input type="text" name="system.animalfamiliar" value="{{system.animalfamiliar}}" data-dtype="String" />
</div>
</fieldset>
-->
<fieldset class="resource grid-span-3 flexcol">
<legend>Wounds</legend>
<div class="flexrow">
<span>Minor</span>
{{#each system.wounds.minor as |minorWound key|}}
<input type="checkbox" name="system.wounds.minor.{{key}}" {{checked minorWound}} />
{{/each}}
</div>
<div class="flexrow">
<span>Moderate</span>
{{#each system.wounds.moderate as |minorWound key|}}
<input type="checkbox" name="system.wounds.moderate.{{key}}" {{checked minorWound}} />
{{/each}}
</div>
<div class="flexrow">
<span>Mortal</span>
{{#each system.wounds.mortal as |minorWound key|}}
<input type="checkbox" name="system.wounds.mortal.{{key}}" {{checked minorWound}} />
{{/each}}
</div> </div>
</fieldset> </fieldset>

View File

@ -1,7 +1,7 @@
<section class="flexcol"> <section class="flexcol">
{{#each system.stats as |stat key|}} {{#each system.stats as |stat key|}}
<Fieldset class="grid grid-5col"> <Fieldset class="grid grid-5col">
<legend>{{key}}</legend> <legend>{{stat.name}}</legend>
<select name="system.stats.{{key}}.value"> <select name="system.stats.{{key}}.value">
{{#select stat.value}} {{#select stat.value}}
<option value="d20">d20</option> <option value="d20">d20</option>
@ -18,11 +18,13 @@
<span class="ability-mod rollable" data-roll="{{stat.value}}+{{stat.stat}}" data-label="Stat Roll for {{key}}"><i class="fas fa-dice-d20"></i></span> <span class="ability-mod rollable" data-roll="{{stat.value}}+{{stat.stat}}" data-label="Stat Roll for {{key}}"><i class="fas fa-dice-d20"></i></span>
<input type="text" name="system.stats.{{key}}.stat" value="{{stat.stat}}" data-dtype="String"/> <input type="text" name="system.stats.{{key}}.stat" value="{{stat.stat}}" data-dtype="String"/>
</Fieldset> </Fieldset>
<!--
<Fieldset class="flexrow"> <Fieldset class="flexrow">
<legend>Magic</legend> <legend>Magic</legend>
<span class="ability-mod rollable" data-roll="{{stat.value}}+{{stat.magic}}" data-label="Magic Roll for {{key}}"><i class="fas fa-dice-d20"></i></span> <span class="ability-mod rollable" data-roll="{{stat.value}}+{{stat.magic}}" data-label="Magic Roll for {{key}}"><i class="fas fa-dice-d20"></i></span>
<input type="text" name="system.stats.{{key}}.magic" value="{{stat.magic}}" data-dtype="String"/> <input type="text" name="system.stats.{{key}}.magic" value="{{stat.magic}}" data-dtype="String"/>
</Fieldset> </Fieldset>
-->
</div> </div>
</Fieldset> </Fieldset>
{{/each}} {{/each}}

View File

@ -1,16 +1,16 @@
<section class="flexcol"> <section class="flexcol">
{{#each system.stats as |stat key|}} {{#each system.stats as |stat key|}}
<Fieldset class="flexrow"> <Fieldset class="flexrow">
<legend>{{capitalizeFirst key}}</legend> <legend><input type="text" value="{{capitalizeFirst stat.name}}" name="system.stats.{{key}}.name"></legend>
<div class="flexrow flex-group-center"> <div class="flexrow flex-group-center">
<!-- Die type dropdown --> <!-- Die type dropdown -->
<select name="system.stats.{{key}}.value"> <select name="system.stats.{{key}}.value">
<option value="d20" {{#if (eq stat.value 'd20')}}selected{{/if}}>Superb</option> <option value="d20" {{#if (eq stat.value 'd20')}}selected{{/if}}>d20</option>
<option value="d12" {{#if (eq stat.value 'd12')}}selected{{/if}}>Impressive</option> <option value="d12" {{#if (eq stat.value 'd12')}}selected{{/if}}>d12</option>
<option value="d10" {{#if (eq stat.value 'd10')}}selected{{/if}}>Above Average</option> <option value="d10" {{#if (eq stat.value 'd10')}}selected{{/if}}>d10</option>
<option value="d8" {{#if (eq stat.value 'd8')}}selected{{/if}}>Below Average</option> <option value="d8" {{#if (eq stat.value 'd8')}}selected{{/if}}>d8</option>
<option value="d6" {{#if (eq stat.value 'd6')}}selected{{/if}}>Bad</option> <option value="d6" {{#if (eq stat.value 'd6')}}selected{{/if}}>d6</option>
<option value="d4" {{#if (eq stat.value 'd4')}}selected{{/if}}>Terrible</option> <option value="d4" {{#if (eq stat.value 'd4')}}selected{{/if}}>d4</option>
</select> </select>
<!-- Stat rolling and input --> <!-- Stat rolling and input -->
@ -22,13 +22,13 @@
<input type="number" name="system.stats.{{key}}.stat" value="{{stat.stat}}" data-dtype="Number"/> <input type="number" name="system.stats.{{key}}.stat" value="{{stat.stat}}" data-dtype="Number"/>
</Fieldset> </Fieldset>
<!-- 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>-->
</div> </div>