diff --git a/css/deltagreen.css b/css/deltagreen.css index 5665435..1e5c14e 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -1,8 +1,10 @@ @import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Didact+Gothic"); + /* Global styles */ .window-app { font-family: "Didact Gothic", "Roboto", sans-serif; + height: auto; } .rollable:hover, .rollable:focus { diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index e6e6d49..3dfab3f 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -10,7 +10,7 @@ export class DeltaGreenActorSheet extends ActorSheet { classes: ["deltagreen", "sheet", "actor"], template: "systems/deltagreen/templates/actor/actor-sheet.html", width: 600, - height: 600, + height: 800, tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }] }); } @@ -20,11 +20,6 @@ export class DeltaGreenActorSheet extends ActorSheet { /** @override */ getData() { const data = super.getData(); - - //data.dtypes = ["String", "Number", "Boolean"]; - //for (let attr of Object.values(data.data.attributes)) { - // attr.isCheckbox = attr.dtype === "Boolean"; - //} // Prepare items. if (this.actor.data.type == 'character') { @@ -66,15 +61,15 @@ export class DeltaGreenActorSheet extends ActorSheet { let item = i.data; i.img = i.img || DEFAULT_TOKEN; // Append to gear. - if (i.type === 'item') { + if (i.type === 'gear') { gear.push(i); } // Append to features. - else if (i.type === 'feature') { + else if (i.type === 'weapon') { features.push(i); } // Append to spells. - else if (i.type === 'spell') { + else if (i.type === 'ritual') { if (i.data.spellLevel != undefined) { spells[i.data.spellLevel].push(i); } @@ -113,9 +108,9 @@ export class DeltaGreenActorSheet extends ActorSheet { li.slideUp(200, () => this.render(false)); }); - // Rollable abilities. + // Rollable abilities - bind to everything with the 'Rollable' class html.find('.rollable').click(this._onRoll.bind(this)); - + // Drag events for macros. if (this.actor.owner) { let handler = ev => this._onDragItemStart(ev); @@ -128,6 +123,7 @@ export class DeltaGreenActorSheet extends ActorSheet { // Custom Sheet Macros html.find('#btnResetBreakingPoint').click(this._resetBreakingPoint.bind(this)); + //html.find('.sanity-test-btn').click(this._onSanityTest.bind(this)); } /** @@ -174,7 +170,11 @@ export class DeltaGreenActorSheet extends ActorSheet { let targetVal = ""; // check the 'data-target="something" property to determine how to grab the target for the roll - if(dataset.target === "statistic.x5"){ + if(! Number.isNaN(dataset.target)){ + targetVal = dataset.target; + label += `, Target: ${targetVal}`; + } + else if(dataset.target === "statistic.x5"){ let stat = this.actor.data.data.statistics[key]; targetVal = stat.x5; label += `, Target: ${targetVal}`; @@ -192,11 +192,8 @@ export class DeltaGreenActorSheet extends ActorSheet { } _resetBreakingPoint(event){ - //let actorData = this.actor.data; let currentBreakingPoint = 0; - console.log('Resetting breaking point...'); - //console.log(actorData); - + currentBreakingPoint = this.actor.data.data.sanity.value - this.actor.data.data.statistics.pow.value; let updatedData = duplicate(this.actor.data.data); diff --git a/module/deltagreen.js b/module/deltagreen.js index 9241e77..9b002c9 100644 --- a/module/deltagreen.js +++ b/module/deltagreen.js @@ -45,6 +45,10 @@ Hooks.once('init', async function() { Handlebars.registerHelper('toLowerCase', function(str) { return str.toLowerCase(); }); + + Handlebars.registerHelper('toUpperCase', function(str) { + return str.toUpperCase(); + }); }); Hooks.once("ready", async function() { diff --git a/system.json b/system.json index 2f7e6b3..ceda844 100644 --- a/system.json +++ b/system.json @@ -1,8 +1,8 @@ { "name": "deltagreen", "title": "Delta Green", - "description": "Delta Green RPG system for FoundryVTT!", - "version": "1.0.3", + "description": "Delta Green RPG system for FoundryVTT.", + "version": "1.0.0", "minimumCoreVersion": "0.6.2", "compatibleCoreVersion": "0.6.2", "templateVersion": 2, diff --git a/template.json b/template.json index 206d0e5..9a9445d 100644 --- a/template.json +++ b/template.json @@ -12,7 +12,9 @@ "max": 10 }, "wp": { - "value": 10 + "value": 10, + "min": 0, + "max": 10 }, "statistics": { "str": { @@ -76,7 +78,7 @@ "failure": false }, "athletics": { - "label": "Artillery", + "label": "Athletics", "proficiency": 30, "failure": false }, @@ -289,6 +291,7 @@ "base", "human_skills" ], + "schemaVersion": 1.0, "sanity": { "value": 100, "currentBreakingPoint": 101, @@ -309,7 +312,8 @@ "motivations":[ { "description":"", - "disorder":"" + "disorder":"", + "crossedOut": false } ] } @@ -317,8 +321,7 @@ "Item": { "types": [ "weapon", - "equipment", - "ability", + "gear", "ritual" ], "templates": { @@ -331,12 +334,7 @@ "base" ] }, - "equipment": { - "templates": [ - "base" - ] - }, - "ability": { + "gear": { "templates": [ "base" ] diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index dec4029..c6657ae 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -25,7 +25,7 @@