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) {
|
async addPerkSpecialisation( event, item, dataItem) {
|
||||||
let newItem = duplicate(item.data);
|
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} );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
@ -1146,7 +1146,7 @@ ul, li {
|
|||||||
.ul-level1 {
|
.ul-level1 {
|
||||||
padding-left: 2rem;
|
padding-left: 2rem;
|
||||||
}
|
}
|
||||||
|
.drop-spec-perk,
|
||||||
.drop-ability-power,
|
.drop-ability-power,
|
||||||
.drop-ability-spec,
|
.drop-ability-spec,
|
||||||
.drop-spec-power,
|
.drop-spec-power,
|
||||||
|
@ -50,9 +50,9 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"templateVersion": 22,
|
"templateVersion": 23,
|
||||||
"title": "Pegasus RPG",
|
"title": "Pegasus RPG",
|
||||||
"url": "https://www.uberwald.me/data/files/fvtt-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"
|
"background" : "./images/ui/pegasus_welcome_page.webp"
|
||||||
}
|
}
|
@ -203,7 +203,7 @@
|
|||||||
"gainspecdice": {
|
"gainspecdice": {
|
||||||
"label": "Gain Specialisation Dice Level",
|
"label": "Gain Specialisation Dice Level",
|
||||||
"flag": false,
|
"flag": false,
|
||||||
"type": "statdice",
|
"type": "dropspec",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"gainbonusdice": {
|
"gainbonusdice": {
|
||||||
@ -215,7 +215,7 @@
|
|||||||
"gainotherdice": {
|
"gainotherdice": {
|
||||||
"label": "Gain Other Dice Level",
|
"label": "Gain Other Dice Level",
|
||||||
"flag": false,
|
"flag": false,
|
||||||
"type": "statdice",
|
"type": "string",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"targethindrance": {
|
"targethindrance": {
|
||||||
@ -239,7 +239,7 @@
|
|||||||
"affectedspec": {
|
"affectedspec": {
|
||||||
"label": "Affected Specialisation",
|
"label": "Affected Specialisation",
|
||||||
"flag": false,
|
"flag": false,
|
||||||
"type": "string",
|
"type": "dropspec",
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"affectspecial": {
|
"affectspecial": {
|
||||||
|
@ -66,6 +66,13 @@
|
|||||||
{{#if (eq feature.type "string")}}
|
{{#if (eq feature.type "string")}}
|
||||||
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String"/>
|
<input type="text" class="padd-right" name="data.features.{{key}}.value" value="{{feature.value}}" data-dtype="String"/>
|
||||||
{{/if}}
|
{{/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")}}
|
{{#if (eq feature.type "text")}}
|
||||||
<div class="small-editor item-text-long-line">
|
<div class="small-editor item-text-long-line">
|
||||||
{{editor content=features.value target="data.features.{{key}}.value" button=true owner=owner editable=editable}}
|
{{editor content=features.value target="data.features.{{key}}.value" button=true owner=owner editable=editable}}
|
||||||
|
Loading…
Reference in New Issue
Block a user