This commit is contained in:
sladecraven 2022-01-12 17:21:37 +01:00
parent 5479605214
commit a5eb96cd97
8 changed files with 35 additions and 13 deletions

View File

@ -348,6 +348,11 @@ export class PegasusItemSheet extends ItemSheet {
specArray.push( newItem );
await this.object.update( { 'data.recoveryrollspec': specArray} );
}
if ( event.toElement.className =='drop-effect-specaffected') {
let specArray = duplicate(this.object.data.data.specaffected);
specArray.push( newItem );
await this.object.update( { 'data.specaffected': specArray} );
}
}
/* -------------------------------------------- */

View File

@ -24,6 +24,10 @@ export class PegasusUtility {
Handlebars.registerHelper('upper', function (text) {
return text.toUpperCase();
});
Handlebars.registerHelper('upperFirst', function (text) {
if (typeof text !== 'string') return text
return text.charAt(0).toUpperCase() + text.slice(1)
});
}

View File

@ -1160,6 +1160,7 @@ ul, li {
.ul-level1 {
padding-left: 2rem;
}
.drop-effect-specaffected,
.drop-effect-spec,
.drop-ability-weapon,
.drop-ability-armor,

View File

@ -100,9 +100,9 @@
"styles": [
"styles/simple.css"
],
"templateVersion": 49,
"templateVersion": 51,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
"version": "0.0.49",
"version": "0.0.51",
"background" : "./images/ui/pegasus_welcome_page.webp"
}

View File

@ -180,6 +180,7 @@
"genre": "",
"effectlevel": 0,
"stataffected": "",
"specaffected": [],
"statdice": false,
"bonusdice": false,
"otherdice": false,

View File

@ -230,8 +230,9 @@
<li class="item stat flexrow list-item" data-arme-id="{{effect.id}}" data-item-id="{{effect._id}}">
<img class="sheet-competence-img" src="{{effect.img}}" />
<span class="generic-label">{{effect.name}}</span>
<span class="generic-label">{{effect.data.type}}</span>
<span class="generic-label">{{effect.data.genre}}</span>
<span class="generic-label">{{upperFirst effect.data.type}}</span>
<span class="generic-label">{{upperFirst effect.data.genre}}</span>
<span class="generic-label">Lvl:{{effect.data.effectlevel}}</span>
<div class="item-controls">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>

View File

@ -35,6 +35,22 @@
<input type="text" class="input-numeric-short padd-right" name="data.effectlevel" value="{{data.effectlevel}}" data-dtype="Number"/>
</li>
<li class="flexrow"> <label class="generic-label">Affected Specialisations </label></li>
<li class="flexrow">
<ul class="ul-level1">
<li class="flexrow"><div class="drop-effect-specaffected"><label>Drop Specialisations here !</label></div>
</li>
{{#each data.specaffected as |spec idx|}}
<li class="flexrow">
<label name="data.specaffected[{{idx}}].name"><a class="view-subitem" data-type="specaffected" data-index="{{idx}}">{{spec.name}}</a></label>
<div class="item-controls padd-left">
<a class="item-control delete-subitem padd-left" data-type="specaffected" data-index="{{idx}}" title="Delete Spec"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</li>
{{#if (eq data.genre "positive")}}
<li class="flexrow"><label class="generic-label">Affected Stat</label>

View File

@ -18,13 +18,7 @@
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Move Rate (MR)</label>
<select class="competence-base flexrow" type="text" name="data.MR" value="{{data.MR}}" data-dtype="Number">
{{#select data.MR}}
{{{optionsDiceList}}}
{{/select}}
</select>
</li>
<li class="flexrow"><label class="generic-label">Level</label>
<select class="competence-base flexrow" type="text" name="data.level" value="{{data.level}}" data-dtype="Number">
{{#select data.level}}