Compare commits

...

14 Commits
master ... dev

Author SHA1 Message Date
Joscha Maier
8470800ee3
further dev 2024-11-24 18:59:43 +01:00
Joscha Maier
dd42e5487c
a 2024-11-04 00:47:13 +01:00
Joscha Maier
bc71b3d2cc
Giving up again 2024-10-19 23:02:28 +02:00
Joscha Maier
54798bd300
I hate this software and documentation 2024-10-07 14:12:05 +02:00
Joscha Maier
8da6565aae
chore: more model stuff 2024-10-02 14:45:44 +02:00
Joscha Maier
ada2dc40c5
feat: continuing to add data models 2024-10-02 00:14:03 +02:00
Joscha Maier
ebed4c3622
The documentation for this shit is non existent holy fuck how are you supposed to know how to do this? they do not know themselves I bet 2024-09-30 16:09:02 +02:00
Joscha Maier
bcf1d8827d
stuff 2024-09-29 14:58:03 +02:00
WinterMyst
c9acf8b9ff Replace Kids_on_Brooms_Cover.jpg 2024-09-23 20:44:01 +00:00
WinterMyst
34c4f8ed5c Replace Kids_on_Brooms_Cover.jpg 2024-09-23 20:43:37 +00:00
WinterMyst
78ad7fc3ac Upload New File 2024-09-23 20:42:29 +00:00
Winter_Myst
9f6e16e741 feat: ci/cd 2024-09-22 01:44:24 +02:00
Winter_Myst
05626878d3 gitignore 2024-09-22 01:15:17 +02:00
Joscha Maier
84067f07dc
feat: updated to github version 2024-09-22 01:11:29 +02:00
24 changed files with 3309 additions and 0 deletions

398
.gitignore vendored Normal file
View 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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 KiB

21
LICENSE Normal file
View 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
View File

@ -0,0 +1,2 @@
# KidsOnBroomsFoundryVTT
The Kids on Brooms System for Foundry VTT

0
css/kidsOnBrooms.css Normal file
View File

80
gulpfile.js Normal file
View 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
View 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
View 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"
}
}
}

View File

@ -0,0 +1,4 @@
export * from "./itemModel.mjs";
export * from "./dataModel.mjs";
export * from "./playerCharacterModel.mjs";
export * from "./baseActorModel.mjs"

View 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();
}
}

View 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"})
};
}
}

View 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})
}
}
}

View 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;
}
}

View File

@ -0,0 +1,7 @@
export default class KidsOnBroomsActor extends Actor {
constructor(data, context) {
super(data, context)
}
}

View File

View File

@ -0,0 +1 @@
export * from "./actor-sheet.mjs"

View 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

File diff suppressed because it is too large Load Diff

20
package.json Normal file
View 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
View File

51
system.json Normal file
View 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"
}

View 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>

View File