Fix gears management"

This commit is contained in:
sladecraven 2021-05-23 11:45:50 +02:00
parent b93a29f7fc
commit 5ceeefb522
4 changed files with 8 additions and 7 deletions

View File

@ -134,12 +134,12 @@ export class SoSActorSheet extends ActorSheet {
});
html.find('.skill-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
const skill = this.actor.get.items(li.data("item-id"));
const skill = this.actor.items.get(li.data("item-id"));
this.actor.rollSkill(skill);
});
html.find('.weapon-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
const weapon = this.actor.get.items(li.data("item-id"));
const weapon = this.actor.items.get(li.data("item-id"));
this.actor.rollWeapon(weapon);
});
html.find('.skill-value').change((event) => {

View File

@ -236,7 +236,7 @@
<img class="sheet-skill-img" src="{{weapon.img}}"/>
<span class="weapon-label"><a>{{weapon.name}}</a></span>
<div class="item-controls">
<a class="item-control item-equip" title="Equipped">{{#if weapon.data.equiped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<a class="item-control item-equip" title="Equipped">{{#if weapon.data.data.equiped}}<i class="fas fa-circle"></i>{{else}}<i class="fas fa-genderless"></i>{{/if}}</a>
<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>
</div>

View File

@ -1,8 +1,8 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{data..img}}" data-edit="img" title="{{data..name}}"/>
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{data..name}}" placeholder="Name"/></h1>
<h1 class="charname"><input name="name" type="text" value="{{data.name}}" placeholder="Name"/></h1>
</div>
</header>

View File

@ -43,10 +43,11 @@
<label class="generic-label">Worn ?</label>
<label class="attribute-value checkbox"><input type="checkbox" name="data.worn" {{checked data.worn}}/></label>
</div>
{{/with}}
<div class="flexcol">
<label class="generic-label">Description</label>
<div class="form-group medium-editor">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
{{editor content=data.data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</div>
{{/with}}