diff --git a/css/deltagreen.css b/css/deltagreen.css index 9d30b9c..8574059 100644 --- a/css/deltagreen.css +++ b/css/deltagreen.css @@ -258,12 +258,20 @@ text-align: right; } -button.btn-tiny{ +a.btn-tiny{ height: 26px; margin-left: 5px; margin-right: 5px; font-size: 13px; padding: 0px; + + text-decoration: none; + background-color: #EEEEEE; + color: #333333; + + border-radius: 4px; + line-height: 25px; + border: 1px solid #333333; } span.breaking-point-label{ diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index fc6de03..ce87a21 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -122,9 +122,22 @@ export class DeltaGreenActorSheet extends ActorSheet { } // Custom Sheet Macros - html.find('#btnResetBreakingPoint').click((event) => { - this._resetBreakingPoint(this); + //html.find('.btn-reset-breaking-point').click(this._resetBreakingPoint.bind(this)); + //html.find('.btn-reset-breaking-point').click((event) => { + // this._resetBreakingPoint(this); + //}); + //html.find('.btn-reset-breaking-point').bind('click', this._resetBreakingPoint(this)); + html.find('.btn-reset-breaking-point').click(event => { + event.preventDefault(); + let currentBreakingPoint = 0; + + currentBreakingPoint = this.actor.data.data.sanity.value - this.actor.data.data.statistics.pow.value; + + let updatedData = duplicate(this.actor.data.data); + updatedData.sanity.currentBreakingPoint = currentBreakingPoint; + this.actor.update({"data": updatedData}); }); + } /** @@ -193,6 +206,7 @@ export class DeltaGreenActorSheet extends ActorSheet { } _resetBreakingPoint(event){ + event.preventDefault(); let currentBreakingPoint = 0; currentBreakingPoint = this.actor.data.data.sanity.value - this.actor.data.data.statistics.pow.value; diff --git a/template.json b/template.json index 3e89344..bc7bf5a 100644 --- a/template.json +++ b/template.json @@ -227,7 +227,7 @@ "types":[ { "specialization": "Painting/Dance/Sculpture/Etc.", - "proficiency": 0, + "proficiency": 20, "failure": false } ] diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index ab1d7c1..36bcb1c 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -55,7 +55,7 @@ Breaking Point: - + Reset @@ -95,12 +95,36 @@ {{!-- Skills Tab --}}
- {{#each data.skills as |skill key|}} -
- - - -
+ {{#each data.skills as |skill key|}} +
+ + + +
+ {{/each}} +
+ +
+ {{#each data.type_skills as |typeskill key|}} +
+ + + {{#each typeskill.types}} +
+ + + + + + + {{!-- Subtyped Skills take the form: data.type_skills.art.types[0].proficiency where 'types' is an array of object. --}} + + +
+ {{/each}} + + +
{{/each}}