Fixed right click menu for weapons
parent
bec12184da
commit
6f8200c82a
|
@ -139,7 +139,7 @@ export class ActorSheetKH extends ActorSheet {
|
|||
},
|
||||
]);
|
||||
|
||||
new ContextMenu(html, "div.item-weapon", [
|
||||
new ContextMenu(html, "li.item-weapon", [
|
||||
{
|
||||
name: game.i18n.localize("MENU.SHOWROLLDIALOG"),
|
||||
icon: '<i class="far dice"></i>',
|
||||
|
@ -147,8 +147,11 @@ export class ActorSheetKH extends ActorSheet {
|
|||
let itemId = li.data("itemId");
|
||||
let _item = this.actor.items.find((element) => element._id == itemId);
|
||||
|
||||
let skillName = _item.name
|
||||
let skillValue = _item.data.data.value
|
||||
// Retrieve skill based on name
|
||||
let skill = this.actor.items.find((element) => element.name === _item.data.data.skill.value);
|
||||
|
||||
let skillName = skill.name
|
||||
let skillValue = skill.data.data.value
|
||||
let showValue = false
|
||||
|
||||
if(this.actor.data.type === "character") {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="{{id}}" class="roll-dialog">
|
||||
<h1 style="text-align: center;">{{skillName}} {{skillValue}}</h1>
|
||||
<h1 style="text-align: center;">{{skillName}} ({{skillValue}})</h1>
|
||||
<label>{{localize "ROLL.OPENCLOSE"}}</label>
|
||||
<input type="button" name="openclosed" min="0" value="{{startopen}}" style="margin-bottom: 10px; min-height: 26px; min-width: 30px;" />
|
||||
<label name="notopenedorclosed" style="display: inline-block;"> </label>
|
||||
|
|
Loading…
Reference in New Issue