Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8470800ee3 | ||
|
dd42e5487c | ||
|
bc71b3d2cc | ||
|
54798bd300 | ||
|
8da6565aae | ||
|
ada2dc40c5 | ||
|
ebed4c3622 | ||
|
bcf1d8827d | ||
|
c9acf8b9ff | ||
|
34c4f8ed5c | ||
|
78ad7fc3ac | ||
|
9f6e16e741 | ||
|
05626878d3 | ||
|
84067f07dc |
398
.gitignore
vendored
Normal file
398
.gitignore
vendored
Normal file
@ -0,0 +1,398 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
ScaffoldingReadMe.txt
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.tlog
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*.json
|
||||||
|
coverage*.xml
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||||
|
*.vbp
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||||
|
*.dsw
|
||||||
|
*.dsp
|
||||||
|
|
||||||
|
# Visual Studio 6 technical files
|
||||||
|
*.ncb
|
||||||
|
*.aps
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# Visual Studio History (VSHistory) files
|
||||||
|
.vshistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
.ionide/
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
FodyWeavers.xsd
|
||||||
|
|
||||||
|
# VS Code files for those working on multiple tools
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
# Windows Installer files from build outputs
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msix
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
*.sln.iml
|
94
.gitlab-ci.yml
Normal file
94
.gitlab-ci.yml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
stages:
|
||||||
|
- compile
|
||||||
|
- release
|
||||||
|
|
||||||
|
# Compile Job (runs on every commit)
|
||||||
|
compile:
|
||||||
|
stage: compile
|
||||||
|
image: node:14
|
||||||
|
script:
|
||||||
|
- npm install --global gulp-cli
|
||||||
|
- npm install
|
||||||
|
- gulp compile
|
||||||
|
only:
|
||||||
|
- branches
|
||||||
|
|
||||||
|
# Release Job (manually triggered with version)
|
||||||
|
release:
|
||||||
|
stage: release
|
||||||
|
image: node:14
|
||||||
|
before_script:
|
||||||
|
- apt-get update && apt-get install -y curl jq
|
||||||
|
- npm install --global gulp-cli
|
||||||
|
- npm install
|
||||||
|
# Set up SSH agent and add private key for pushing to protected branch
|
||||||
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
|
||||||
|
script:
|
||||||
|
# Check if VERSION is provided
|
||||||
|
- if [ -z "$VERSION" ]; then echo "Error: VERSION variable is required." && exit 1; fi
|
||||||
|
|
||||||
|
# Run Gulp release task (includes zipping)
|
||||||
|
- gulp release
|
||||||
|
|
||||||
|
# Create a release on GitLab
|
||||||
|
- export RELEASE_RESPONSE=$(curl --request POST \
|
||||||
|
--header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
|
||||||
|
--header "Content-Type: application/json" \
|
||||||
|
--data '{
|
||||||
|
"name": "Release v'$VERSION'",
|
||||||
|
"tag_name": "v'$VERSION'",
|
||||||
|
"description": "Release v'$VERSION'",
|
||||||
|
"ref": "master",
|
||||||
|
"assets": {
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"name": "Download kids-on-brooms.zip",
|
||||||
|
"url": "https://gitlab.com/YOUR_NAMESPACE/YOUR_PROJECT/-/jobs/$CI_JOB_ID/artifacts/download"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}' "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/releases")
|
||||||
|
|
||||||
|
# Get the release URL from the response
|
||||||
|
- export RELEASE_URL=$(echo $RELEASE_RESPONSE | jq -r '.assets.links[0].url')
|
||||||
|
|
||||||
|
# Update the system.json file with the release URL
|
||||||
|
- sed -i "s|\"download\":.*|\"download\": \"$RELEASE_URL\",|" system.json
|
||||||
|
|
||||||
|
# Commit the updated system.json and push it to master
|
||||||
|
- git config --global user.name "GitLab CI"
|
||||||
|
- git config --global user.email "ci@gitlab.com"
|
||||||
|
- git add system.json
|
||||||
|
- git commit -m "Update system.json with release URL"
|
||||||
|
- git push origin master
|
||||||
|
|
||||||
|
# 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/kids-on-brooms/-/raw/master/system.json",
|
||||||
|
"notes": "https://gitlab.com/wintermyst/kids-on-brooms/releases/tag/v'$VERSION'",
|
||||||
|
"compatibility": {
|
||||||
|
"minimum": "12.331",
|
||||||
|
"verified": "12.331",
|
||||||
|
"maximum": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}'
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
when: manual
|
||||||
|
allow_failure: false
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- kids-on-brooms.zip
|
||||||
|
expire_in: never
|
BIN
Kids_on_Brooms_Cover.jpg
Normal file
BIN
Kids_on_Brooms_Cover.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 915 KiB |
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Joscha Maier
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
2
README.md
Normal file
2
README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# KidsOnBroomsFoundryVTT
|
||||||
|
The Kids on Brooms System for Foundry VTT
|
0
css/kidsOnBrooms.css
Normal file
0
css/kidsOnBrooms.css
Normal file
80
gulpfile.js
Normal file
80
gulpfile.js
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
const gulp = require('gulp');
|
||||||
|
const prefix = require('gulp-autoprefixer');
|
||||||
|
const sourcemaps = require('gulp-sourcemaps');
|
||||||
|
const sass = require('gulp-sass')(require('sass'));
|
||||||
|
const zip = require('gulp-zip');
|
||||||
|
const { compile } = require('sass');
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Compile Sass
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
|
// Small error handler helper function.
|
||||||
|
function handleError(err) {
|
||||||
|
console.log(err.toString());
|
||||||
|
this.emit('end');
|
||||||
|
}
|
||||||
|
|
||||||
|
const SYSTEM_SCSS = ["scss/**/*.scss"];
|
||||||
|
function compileScss() {
|
||||||
|
// Configure options for sass output. For example, 'expanded' or 'nested'
|
||||||
|
let options = {
|
||||||
|
outputStyle: 'expanded'
|
||||||
|
};
|
||||||
|
return gulp.src(SYSTEM_SCSS)
|
||||||
|
.pipe(
|
||||||
|
sass(options)
|
||||||
|
.on('error', handleError)
|
||||||
|
)
|
||||||
|
.pipe(prefix({
|
||||||
|
cascade: false
|
||||||
|
}))
|
||||||
|
.pipe(gulp.dest("./css"))
|
||||||
|
}
|
||||||
|
const css = gulp.series(compileScss);
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Watch Updates
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
|
function watchUpdates() {
|
||||||
|
gulp.watch(SYSTEM_SCSS, compileScss());
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Export Tasks
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
|
exports.default = gulp.series(
|
||||||
|
compileScss,
|
||||||
|
watchUpdates
|
||||||
|
);
|
||||||
|
exports.build = gulp.series(
|
||||||
|
compileScss
|
||||||
|
);
|
||||||
|
exports.css = css;
|
||||||
|
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
/* Zip Release
|
||||||
|
/* ----------------------------------------- */
|
||||||
|
|
||||||
|
function zipRelease() {
|
||||||
|
return gulp.src([
|
||||||
|
'./**/*',
|
||||||
|
'!./node_modules/**',
|
||||||
|
'!./.git/**',
|
||||||
|
'!./.gitignore',
|
||||||
|
'!./gulpfile.js',
|
||||||
|
'!./package-lock.json',
|
||||||
|
'!./package.json',
|
||||||
|
'!./scss/**/*',
|
||||||
|
'!./.github/**/*',
|
||||||
|
], { base: '.' })
|
||||||
|
.pipe(zip('kids-on-brooms.zip'))
|
||||||
|
.pipe(gulp.dest('.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.release = gulp.series(
|
||||||
|
compileScss,
|
||||||
|
zipRelease
|
||||||
|
);
|
23
kidsonbrooms.mjs
Normal file
23
kidsonbrooms.mjs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import * as models from "./modules/dataModel/_system.mjs";
|
||||||
|
import * as sheets from "./modules/sheets/_system.mjs";
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Foundry VTT Initialization */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
|
||||||
|
const SYSTEM = {
|
||||||
|
id: "kidsonbrooms",
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Hooks.once("init", async function() {
|
||||||
|
console.log("Initialising Kids on Brooms system");
|
||||||
|
|
||||||
|
globalThis.kidsonbrooms = game.system;
|
||||||
|
game.system.CONST = SYSTEM;
|
||||||
|
|
||||||
|
Actors.unregisterSheet("core", ActorSheet);
|
||||||
|
Actors.registerSheet(SYSTEM.id, "{{sheets.BaseActorSheet}}", {types: ["PlayerCharacter"], makeDefault: true});
|
||||||
|
sheets.BaseActorSheet.getTemplate();
|
||||||
|
CONFIG.Actor.dataModels = models.playerCharacterModel;
|
||||||
|
|
||||||
|
})
|
30
lang/en.json
Normal file
30
lang/en.json
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"BaseActor": {
|
||||||
|
"FIELDS": {
|
||||||
|
"age": "Age",
|
||||||
|
"pronouns": "Pronouns",
|
||||||
|
"fear": "Fear",
|
||||||
|
"grade": "Grade",
|
||||||
|
"stats": {
|
||||||
|
"fight": "Fight",
|
||||||
|
"brains": "Brains",
|
||||||
|
"charm": "Charm",
|
||||||
|
"flight": "Flight",
|
||||||
|
"brawn": "Brawn",
|
||||||
|
"grit": "Grit"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"PlayerCharacter": {
|
||||||
|
"FIELDS": {
|
||||||
|
"description": "Description",
|
||||||
|
"broom": "Broom",
|
||||||
|
"wand": "Wand",
|
||||||
|
"animalFamiliar": "Animal Familiar",
|
||||||
|
"schoolbag": "Schoolbag",
|
||||||
|
"strengths": "Strengths",
|
||||||
|
"adversityTokens": "Adversity Tokens"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
4
modules/dataModel/_system.mjs
Normal file
4
modules/dataModel/_system.mjs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export * from "./itemModel.mjs";
|
||||||
|
export * from "./dataModel.mjs";
|
||||||
|
export * from "./playerCharacterModel.mjs";
|
||||||
|
export * from "./baseActorModel.mjs"
|
31
modules/dataModel/baseActorModel.mjs
Normal file
31
modules/dataModel/baseActorModel.mjs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import Stat from "./dataModel.mjs"
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Actor base Model */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
const fields = foundry.data.fields;
|
||||||
|
export default class ActorGeneral extends foundry.abstract.TypeDataModel
|
||||||
|
{
|
||||||
|
static defineSchema(){
|
||||||
|
return {
|
||||||
|
age: new fields.StringField({required: false}),
|
||||||
|
pronouns: new fields.StringField({required: false}),
|
||||||
|
fear: new fields.StringField({required: false}),
|
||||||
|
grade: new fields.StringField({required: false}),
|
||||||
|
stats: new fields.SchemaField({
|
||||||
|
fight: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
|
||||||
|
brains: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
|
||||||
|
charm: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
|
||||||
|
flight: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
|
||||||
|
brawn: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
|
||||||
|
grit: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static LOCALISATION_PREFIXES = ["BaseActor"];
|
||||||
|
|
||||||
|
prepareDerivedData() {
|
||||||
|
super.prepareDerivedData();
|
||||||
|
}
|
||||||
|
}
|
71
modules/dataModel/dataModel.mjs
Normal file
71
modules/dataModel/dataModel.mjs
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Base Models */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
const fields = foundry.data.fields;
|
||||||
|
export default class Stat extends foundry.abstract.DataModel
|
||||||
|
{
|
||||||
|
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
id: new fields.StringField({ required: true, initial: "statID"}),
|
||||||
|
name: new fields.StringField({ required: true, intial: "Stat"}),
|
||||||
|
die: new fields.NumberField({ required: true, nullable: false, initial: "d4"}),
|
||||||
|
modifiers: new fields.ArrayField({ required: true, type: Modifier, default: []}),
|
||||||
|
modifier: new fields.NumberField({required: true, integer: true, initial: 0})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Modifier extends foundry.abstract.DataModel
|
||||||
|
{
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
statID: new fields.StringField({ required: true, initial: "statID"}),
|
||||||
|
name: new fields.StringField({ required: true, initial: "Modifier"}),
|
||||||
|
value: new fields.NumberField({ required: true, integer: true, initial: 0}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Modifier(statID,name,value) {
|
||||||
|
this.statID = statID;
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Effect Models */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
export class Effect extends foundry.abstract.DataModel
|
||||||
|
{
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
description: new fields.StringField({ required: true, initial: "A EffectDescription" }),
|
||||||
|
modifier: new fields.EmbeddedDataField(Modifier, { required: true, nullable: true, default: null}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Flaw extends foundry.abstract.DataModel
|
||||||
|
{
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
name: new fields.StringField({ required: true, initial: "Flaw"}),
|
||||||
|
description: new fields.StringField({ required: true, initial: "A FlawDescription" })
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Strength extends Effect
|
||||||
|
{
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
...super.defineSchema(),
|
||||||
|
name: new fields.StringField({ required: true, initial: "Strength"})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
45
modules/dataModel/itemModel.mjs
Normal file
45
modules/dataModel/itemModel.mjs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import Effect from "./dataModel.mjs";
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* Item Models */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* How this will work is when we first load a sheet we load all the items we have and take their effects and apply them to our stats. */
|
||||||
|
const fields = foundry.data.fields;
|
||||||
|
export default class KidsOnBroomsItem extends foundry.abstract.TypeDataModel
|
||||||
|
{
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
description: new fields.StringField({ required: true, initial: "An KidsOnBroomsItemDescription" }),
|
||||||
|
effects: new fields.ArrayField({ required: true, type: Effect, default: []}),
|
||||||
|
quantity: new fields.NumberField({required: true, nullable: false, integer: true, initial: 1, min: 0}),
|
||||||
|
price: new fields.NumberField({required: true, nullable: false, integer: true, initial: 0, min: 0}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
KidsOnBroomsItem(name,description,effects) {
|
||||||
|
this.name = name;
|
||||||
|
this.description = description;
|
||||||
|
this.effects = effects;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Wand extends KidsOnBroomsItem
|
||||||
|
{
|
||||||
|
static defineSchema() {
|
||||||
|
return {
|
||||||
|
wood: new fields.EmbeddedDataField(KidsOnBroomsItem, { required: true, nullable: true, default: null}), //These are just KidsOnBroomsItems!
|
||||||
|
core: new fields.EmbeddedDataField(KidsOnBroomsItem, { required: true, nullable: true, default: null}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Broom extends KidsOnBroomsItem
|
||||||
|
{
|
||||||
|
static defineSchema(){
|
||||||
|
return {
|
||||||
|
look: new fields.StringField({required: true, initial: "A broom"}),
|
||||||
|
mechanicalBenefit: new fields.EmbeddedDataField(Effect, {required: false})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
48
modules/dataModel/playerCharacterModel.mjs
Normal file
48
modules/dataModel/playerCharacterModel.mjs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import ActorGeneral from "./baseActorModel.mjs";
|
||||||
|
import {Wand, Broom} from "./itemModel.mjs"
|
||||||
|
import KidsOnBroomsItem from "./itemModel.mjs"
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
/* PC Model */
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
const fields = foundry.data.fields;
|
||||||
|
export default class PlayerCharacter extends ActorGeneral
|
||||||
|
{
|
||||||
|
static defineSchema(){
|
||||||
|
return {
|
||||||
|
...super.defineSchema(),
|
||||||
|
description: new fields.StringField({required: false, intial: "Enter your characters description here."}),
|
||||||
|
broom: new fields.EmbeddedDataField(Broom, {nullable: true}),
|
||||||
|
wand: new fields.EmbeddedDataField(Wand, {nullable: true}),
|
||||||
|
animalFamiliar: new fields.StringField({required: false, initial: "Describe your companion!"}),
|
||||||
|
schoolbag: new fields.ArrayField({type: KidsOnBroomsItem, default: []}),
|
||||||
|
strengths: new fields.ArrayField({type: Strength, default: []}),
|
||||||
|
adversityTokens: new fields.NumberField({required: true, nullable: false, integer: true, initial: 3, min: 0})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static LOCALISATION_PREFIXES = ["PlayerCharacter"];
|
||||||
|
|
||||||
|
prepareBaseData() {
|
||||||
|
super.prepareBaseData();
|
||||||
|
let effectsToApply = this.gatherEffects();
|
||||||
|
|
||||||
|
effectsToApply.forEach(element => {
|
||||||
|
console.log(element);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
gatherEffects() {
|
||||||
|
let effectsToApply = new [];
|
||||||
|
|
||||||
|
this.schoolbag.array.forEach(element => {
|
||||||
|
if(element.effects != []) {
|
||||||
|
element.effects.forEach(effect => {
|
||||||
|
effectsToApply.push(effect);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return effectsToApply;
|
||||||
|
}
|
||||||
|
}
|
7
modules/documents/actor.mjs
Normal file
7
modules/documents/actor.mjs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export default class KidsOnBroomsActor extends Actor {
|
||||||
|
constructor(data, context) {
|
||||||
|
super(data, context)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
0
modules/documents/item.mjs
Normal file
0
modules/documents/item.mjs
Normal file
1
modules/sheets/_system.mjs
Normal file
1
modules/sheets/_system.mjs
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from "./actor-sheet.mjs"
|
31
modules/sheets/actor-sheet.mjs
Normal file
31
modules/sheets/actor-sheet.mjs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
const {api, sheets} = foundry.applications;
|
||||||
|
|
||||||
|
|
||||||
|
export default class BaseActorSheet extends api.HandlebarsApplicationMixin(sheets.ActorSheetV2) {
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
static get defaultOptions()
|
||||||
|
{
|
||||||
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
|
classes: ["kidsonbrooms", "sheet", "actor"],
|
||||||
|
width: 800,
|
||||||
|
height: 800,
|
||||||
|
tabs: [{}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @override */
|
||||||
|
get template()
|
||||||
|
{
|
||||||
|
console.log("template", this.actor)
|
||||||
|
return `systems/kidsonbrooms/templates/actor/actor-sheet-{$this.actor.type}.html`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getData()
|
||||||
|
{
|
||||||
|
const context = super.getData();
|
||||||
|
|
||||||
|
console.log(context);
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
}
|
2332
package-lock.json
generated
Normal file
2332
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
package.json
Normal file
20
package.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "kidsonbroomsfoundryvtt",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "The Kids on Brooms System for Foundry VTT",
|
||||||
|
"main": "kidsonbroomsfoundryvtt.js",
|
||||||
|
"scripts": {
|
||||||
|
"sass": "sass --watch scss/kidsOnBrooms.scss css/kidsOnBrooms.css"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"devDependencies": {
|
||||||
|
"gulp": "^5.0.0",
|
||||||
|
"mathjs": "^13.1.1",
|
||||||
|
"sass": "^1.79.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"kidsonbroomsfoundryvtt": "file:"
|
||||||
|
}
|
||||||
|
}
|
0
scss/kidsOnBrooms.scss
Normal file
0
scss/kidsOnBrooms.scss
Normal file
51
system.json
Normal file
51
system.json
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"name": "kidsonbrooms",
|
||||||
|
"title": "Kids on Brooms",
|
||||||
|
"description": "This is a implementation of the Kids on Brooms system in FoundryVTT.",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"compatibility": {
|
||||||
|
"minimum": 12,
|
||||||
|
"verified": 12
|
||||||
|
},
|
||||||
|
"esmodules": ["kidsonbrooms.mjs"],
|
||||||
|
"authors": [{
|
||||||
|
"name": "Joscha Maier",
|
||||||
|
"url": "https://gitlab.com/wintermyst"
|
||||||
|
}],
|
||||||
|
"documentTypes": {
|
||||||
|
"Actor": {
|
||||||
|
"playerCharacter": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"languages": [{
|
||||||
|
"lang": "en",
|
||||||
|
"name": "English",
|
||||||
|
"path": "lang/en.json"
|
||||||
|
}],
|
||||||
|
"packs": [],
|
||||||
|
"packFolders": [],
|
||||||
|
"socket": true,
|
||||||
|
"url": "https://gitlab.com/wintermyst/kidsonbrooms",
|
||||||
|
"manifest": "https://your/hosted/system/repo/system.json",
|
||||||
|
"download": "https://your/packaged/download/archive.zip",
|
||||||
|
"grid:": {
|
||||||
|
"type": 1,
|
||||||
|
"distance": 5,
|
||||||
|
"units": "ft"
|
||||||
|
},
|
||||||
|
"relationships": {
|
||||||
|
"requires": [
|
||||||
|
{
|
||||||
|
"id": "lib-wrapper",
|
||||||
|
"type": "module",
|
||||||
|
"compatibility": {
|
||||||
|
"minimum": "1.0.0.0",
|
||||||
|
"verified": "1.12.6.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"primaryTokenAttribute": "system.adversityTokens"
|
||||||
|
}
|
20
templates/actor/actor-sheet-PlayerCharacter.html
Normal file
20
templates/actor/actor-sheet-PlayerCharacter.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<form class="{{cssClass}} {{actor.type}} flexcol" autocomplete="off">
|
||||||
|
{{!-- Sheet Header --}}
|
||||||
|
<header class="sheet-header">
|
||||||
|
<img class="profile-img" src="{{actor.img}}" data-edit="img" title="{{actor.name}}" height="100" width="100"/>
|
||||||
|
<div class="header-fields">
|
||||||
|
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
|
||||||
|
|
||||||
|
<div class="resources grid">
|
||||||
|
<div class="resource flex-group-center">
|
||||||
|
<label for="system.trope" class="resource-label">Trope</label>
|
||||||
|
<div class="resource-content flexrow flex-center flex-between">
|
||||||
|
<input type="text" name="system.trope" value="{{system.trope}}" data-dtype="String"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
</form>
|
0
templates/item/item-sheet.html
Normal file
0
templates/item/item-sheet.html
Normal file
Loading…
Reference in New Issue
Block a user