Update perks
This commit is contained in:
parent
ac6f71de65
commit
7a06989d87
@ -292,7 +292,15 @@ export class PegasusItemSheet extends ItemSheet {
|
||||
/* -------------------------------------------- */
|
||||
async addPerkSpecialisation( event, item, dataItem) {
|
||||
let newItem = duplicate(item.data);
|
||||
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} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -1146,7 +1146,7 @@ ul, li {
|
||||
.ul-level1 {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
.drop-spec-perk,
|
||||
.drop-ability-power,
|
||||
.drop-ability-spec,
|
||||
.drop-spec-power,
|
||||
|
@ -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"
|
||||
}
|
@ -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": {
|
||||
|
@ -66,6 +66,13 @@
|
||||
{{#if (eq feature.type "string")}}
|
||||
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String"/>
|
||||
{{/if}}
|
||||
{{#if (eq feature.type "dropspec")}}
|
||||
<ul class="ul-level1">
|
||||
<li class="flexrow"><div class="drop-spec-perk" data-key={{key}}><label>Drop Specialisation here !</label></div>
|
||||
</li>
|
||||
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String"/>
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{#if (eq feature.type "text")}}
|
||||
<div class="small-editor item-text-long-line">
|
||||
{{editor content=features.value target="data.features.{{key}}.value" button=true owner=owner editable=editable}}
|
||||
|
Loading…
Reference in New Issue
Block a user