diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index ca86e22..0b39ac4 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -146,17 +146,17 @@ export class DeltaGreenActorSheet extends ActorSheet { this.actor.update({"data": updatedData}); }); - html.find('.btn-add-bond').click(event => { - event.preventDefault(); - this._addNewBond(); - }); + //html.find('.btn-add-bond').click(event => { + // event.preventDefault(); + // this._addNewBond(); + //}); - html.find('.btn-remove-bond').click(event => { - event.preventDefault(); - let skillindex = event.target.getAttribute("data-index"); + //html.find('.btn-remove-bond').click(event => { + // event.preventDefault(); + // let skillindex = event.target.getAttribute("data-index"); - this._removeBond(skillindex); - }); + // this._removeBond(skillindex); + //}); } @@ -197,40 +197,6 @@ export class DeltaGreenActorSheet extends ActorSheet { this.actor.update({"data": updatedData}); } - _addNewBond(){ - let updatedData = duplicate(this.actor.data.data); - let updatedBonds = []; - let x; - - for(x in updatedData.bonds){ - if(Number.isNumeric(x)){ - updatedBonds.push(updatedData.bonds[x]); - } - } - - updatedBonds.push({"description": "New", "score": updatedData.statistics.cha.value}); - - updatedData.bonds = updatedBonds; - - this.actor.update({"data": updatedData}); - } - - _removeBond(pos){ - let updatedData = duplicate(this.actor.data.data); - let updatedBonds = []; - let x; - - for(x in updatedData.bonds){ - if(Number.isNumeric(x) && x != pos){ - updatedBonds.push(updatedData.bonds[x]); - } - } - - updatedData.bonds = updatedBonds; - - this.actor.update({"data": updatedData}); - } - /** * Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset * @param {Event} event The originating click event @@ -258,11 +224,13 @@ export class DeltaGreenActorSheet extends ActorSheet { itemData.data.skill = "firearms"; //default skill to firearms, since that will be most common itemData.data.expense = "Standard"; } - - if(type == "armor"){ + else if(type == "armor"){ itemData.data.armor = 3; itemData.data.expense = "Standard"; } + else if(type == "bond"){ + itemData.data.score = this.object.data.data.statistics.cha.value; // Can vary, but at character creation starting bond score is usually agent's charisma + } // Finally, create the item! return this.actor.createOwnedItem(itemData); diff --git a/template.json b/template.json index c788ca0..f1e3067 100644 --- a/template.json +++ b/template.json @@ -386,7 +386,7 @@ "templates":[ "base" ], - "score": -9999 + "score": 10 } } } \ No newline at end of file diff --git a/templates/item/item-bond-sheet.html b/templates/item/item-bond-sheet.html index 3c91d8c..d89d8a6 100644 --- a/templates/item/item-bond-sheet.html +++ b/templates/item/item-bond-sheet.html @@ -1,15 +1,24 @@
- -
-

+
+ +
+
+

+
+
+ + +
+
{{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}} @@ -19,10 +28,5 @@
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
- - {{!-- Attributes Tab --}} -
- {{!-- As you add new fields, add them in here! --}} -
diff --git a/templates/item/item-motivation-sheet.html b/templates/item/item-motivation-sheet.html index b340bbe..325b00d 100644 --- a/templates/item/item-motivation-sheet.html +++ b/templates/item/item-motivation-sheet.html @@ -1,7 +1,5 @@
- - {{!-- Sheet Tab Navigation --}}