feat: updated to github version

This commit is contained in:
Joscha Maier
2024-09-22 01:11:29 +02:00
parent 9337233b21
commit 84067f07dc
11 changed files with 2032 additions and 0 deletions
+21
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
View File
@@ -0,0 +1,2 @@
# KidsOnBroomsFoundryVTT
The Kids on Brooms System for Foundry VTT
View File
+79
View File
@@ -0,0 +1,79 @@
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');
/* ----------------------------------------- */
/* 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, css);
}
/* ----------------------------------------- */
/* 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.build = gulp.series(
compileScss,
zipRelease
);
+9
View File
@@ -0,0 +1,9 @@
{
"KIDSONBROOMS.EffectCreate": "Create Effect",
"KIDSONBROOMS.EffectToggle": "Toggle Effect",
"KIDSONBROOMS.EffectEdit": "Edit Effect",
"KIDSONBROOMS.EffectDelete": "Delete Effect",
"KIDSONBROOMS.Add": "Add"
}
+1720
View File
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
{
"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",
"sass": "^1.79.3"
},
"dependencies": {
"kidsonbroomsfoundryvtt": "file:"
}
}
+108
View File
@@ -0,0 +1,108 @@
const {
HTMLField, SchemaField, NumberField, StringField, FilePathField, ArrayField
} = foundry.data.fields;
/* -------------------------------------------- */
/* Base Models */
/* -------------------------------------------- */
class Stat extends foundry.abstract.TypeDataModel
{
static defineSchema() {
return {
id: new StringField({ required: true, initial: "statID"}),
name: new StringField({ required: true, intial: "Stat"}),
die: new NumberField({ required: true, integer: true, min: 0, max: 20, initial: 4}),
modifiers: new ArrayField({ required: true, type: Modifier, default: []}),
};
}
}
class Modifier extends foundry.abstract.TypeDataModel
{
static defineSchema() {
return {
statID: new StringField({ required: true, initial: "statID"}),
name: new StringField({ required: true, initial: "Modifier"}),
value: new NumberField({ required: true, integer: true, initial: 0}),
};
}
Modifier(statID,name,value) {
this.statID = statID;
this.name = name;
this.value = value;
};
}
/* -------------------------------------------- */
/* Effect Models */
/* -------------------------------------------- */
class EffectDataModel extends foundry.abstract.TypeDataModel
{
static defineSchema() {
return {
description: new StringField({ required: true, initial: "A EffectDescription" }),
modifier: new Modifier({ required: true, nullable: true, default: null}),
};
}
}
class Flaw extends foundry.abstract.TypeDataModel
{
static defineSchema() {
return {
name: new StringField({ required: true, initial: "Flaw"}),
description: new StringField({ required: true, initial: "A FlawDescription" })
};
}
}
class Strength extends EffectDataModel
{
static defineSchema() {
return {
...super.defineSchema(),
name: new StringField({ required: true, initial: "Strength"})
};
}
}
/* -------------------------------------------- */
/* 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. */
class Item extends foundry.abstract.TypeDataModel
{
static defineSchema() {
return {
name: new StringField({ required: true, initial: "Item"}),
description: new StringField({ required: true, initial: "An ItemDescription" }),
effects: new ArrayField({ required: true, type: EffectDataModel, default: []}),
};
}
Item(name,description,effects) {
this.name = name;
this.description = description;
this.effects = effects;
}
}
class Wand extends Item
{
static defineSchema() {
return {
name: new StringField({ required: true, initial: "Wand"}),
wood: new Item({ required: true, initial: new Item()}),
core: new Item({ required: true, initial: new Item()}),
};
}
}
/* -------------------------------------------- */
/* Actor Models */
/* -------------------------------------------- */
View File
+23
View File
@@ -0,0 +1,23 @@
{
"name": "Kids-On-Brooms",
"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
},
"authors": [{
"name": "Joscha Maier",
"url": "https://github.com/josmaier"
}],
"languages": [{
"lang": "en",
"name": "English",
"path": "lang/en.json"
}],
"socket": true,
"url": "https://github.com/josmaier/KidsOnBroomsFoundryVTT",
"manifest": "https://your/hosted/system/repo/system.json",
"download": "https://your/packaged/download/archive.zip"
}
+51
View File
@@ -0,0 +1,51 @@
{
"Actor":{},
"Item":{
"types":[
"broom",
"wandCore",
"wandWood",
"flaw",
"strength",
"wandCoreEffect",
"wandWoodEffect",
"broomEffect"
],
"broom":{
"name":"Broom",
"riderDescription": "The rider of the broom.",
"mechanicalBenefit": "The mechanical benefit of the broom."
},
"wandCore":{
"name": "Wand Core",
"stat": "The stat that the wand core affects."
},
"wandWood":{
"name": "Wand Wood",
"stat": "The stat that the wand wood affects."
},
"flaw":{
"name": "Flaw"
},
"strength": {
"name": "Strength",
"mechanicalBenefit": "The mechanical benefit of the strength."
},
"wandCoreEffect": {
"name": "Wand Core Effect",
"stat": "The stat that the wand core effect affects."
},
"wandWoodEffect": {
"name": "Wand Wood Effect",
"stat": "The stat that the wand wood effect affects."
},
"broomEffect": {
"name": "Broom Effect",
"stat": "The stat that the broom effect affects.",
"strength": {
"name": "Strength",
"mechanicalBenefit": "The mechanical benefit of the strength."
}
}
}
}