diff --git a/modules/pegasus-item-sheet.js b/modules/pegasus-item-sheet.js index 5b71a27..4cc441b 100644 --- a/modules/pegasus-item-sheet.js +++ b/modules/pegasus-item-sheet.js @@ -292,7 +292,15 @@ export class PegasusItemSheet extends ItemSheet { /* -------------------------------------------- */ async addPerkSpecialisation( event, item, dataItem) { let newItem = duplicate(item.data); - await this.object.update( { 'data.features.affectedspec.value': newItem.name} ); + if ( event.toElement.className == 'drop-spec-perk') { + //console.log("PER SPEC", event) + let key = event.toElement.dataset["key"]; + if ( key == 'affectedspec') { + await this.object.update( { 'data.features.affectedspec.value': newItem.name} ); + } else { + await this.object.update( { 'data.features.gainspecdice.value': newItem.name} ); + } + } } /* -------------------------------------------- */ diff --git a/styles/simple.css b/styles/simple.css index fd21143..b57b7ea 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1146,7 +1146,7 @@ ul, li { .ul-level1 { padding-left: 2rem; } - +.drop-spec-perk, .drop-ability-power, .drop-ability-spec, .drop-spec-power, diff --git a/system.json b/system.json index f7f3219..579c9ca 100644 --- a/system.json +++ b/system.json @@ -50,9 +50,9 @@ "styles": [ "styles/simple.css" ], - "templateVersion": 22, + "templateVersion": 23, "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "0.0.22", + "version": "0.0.23", "background" : "./images/ui/pegasus_welcome_page.webp" } \ No newline at end of file diff --git a/template.json b/template.json index 24cc04a..ae68a0c 100644 --- a/template.json +++ b/template.json @@ -203,7 +203,7 @@ "gainspecdice": { "label": "Gain Specialisation Dice Level", "flag": false, - "type": "statdice", + "type": "dropspec", "value": "" }, "gainbonusdice": { @@ -215,7 +215,7 @@ "gainotherdice": { "label": "Gain Other Dice Level", "flag": false, - "type": "statdice", + "type": "string", "value": "" }, "targethindrance": { @@ -239,7 +239,7 @@ "affectedspec": { "label": "Affected Specialisation", "flag": false, - "type": "string", + "type": "dropspec", "value": "" }, "affectspecial": { diff --git a/templates/item-perk-sheet.html b/templates/item-perk-sheet.html index fcccdce..7ed4cb9 100644 --- a/templates/item-perk-sheet.html +++ b/templates/item-perk-sheet.html @@ -66,6 +66,13 @@ {{#if (eq feature.type "string")}} {{/if}} + {{#if (eq feature.type "dropspec")}} + + {{/if}} {{#if (eq feature.type "text")}}
{{editor content=features.value target="data.features.{{key}}.value" button=true owner=owner editable=editable}}