Skip to content

Commit 4a1a8ee

Browse files
committed
work on .5
1 parent 00ee5b0 commit 4a1a8ee

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

lang/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"LOOTSHEET.TypeOfSheet":"Type of sheet:",
1313
"LOOTSHEET.PriceModifier":"Price Modifier",
1414
"LOOTSHEET.LootAll":"Loot All",
15+
"LOOTSHEET.LootCoins":"Loot Coins",
1516
"LOOTSHEET.GMSettings":"GM Settings",
1617
"LOOTSHEET.TypeOfSheetHelp":"Loot: allows for looting of items and coins.\nMerchant: allows players to purchase items directly from the sheet.",
1718
"LOOTSHEET.MerchantSettings":"Merchant Settings",

lootsheet-simple.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class LootSheet5eNPC extends dnd5e.applications.actor.ActorSheet5eNPC2 {
299299
html.find('.item-lootall').click((ev) => this._lootItem(ev, 1))
300300

301301
// Loot Currency
302-
html.find('.currency-loot').click((ev) => this._lootCoins(ev))
302+
html.find('.currency-loot').removeAttr('disabled').click((ev) => this._lootCoins(ev))
303303

304304
// Loot All
305305
html

module.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "Loot Sheet NPC 5e (Simple Version)",
33
"description": "This module adds an additional NPC sheet which can be used for loot containers such as chests or shopkeepers.",
4-
"version": "12.400.4",
4+
"version": "12.400.5",
55
"esmodules": [
66
"/lootsheet-simple.js"
77
],

template/npc-sheet.hbs

+8-7
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@
4141
<div class="right">
4242
<div class="left">
4343
<div class="sheet-header-buttons">
44-
{{#ifeq lootsheettype "Loot"}} {{#if lootAll}}
45-
<!-- <div class="charbutton">
46-
<button type="button" class="loot-all" name="loot-all" value="1"><i class="fas fa-gem"></i> Loot All</button>
47-
</div> -->
48-
{{/if}} {{/ifeq}} {{#if isGM}} {{#ifeq lootsheettype "Merchant"}}
44+
{{#if isGM}} {{#ifeq lootsheettype "Merchant"}}
4945
<button
5046
type="button"
5147
class="price-modifier gold-button"
@@ -183,6 +179,7 @@
183179

184180

185181

182+
186183
}}selected{{/if
187184

188185

@@ -192,6 +189,7 @@
192189

193190

194191

192+
195193
}}>
196194
{{
197195
table.name
@@ -428,8 +426,8 @@
428426
>
429427
<i class="fas fa-minus"></i>
430428
</a>
431-
{{/notequal}} {{/if}}
432-
{{#if @root.editable}}
429+
{{/notequal}} {{/if}} {{#if @root.editable}}
430+
{{#notequal item.type "container"}}
433431
<input
434432
type="text"
435433
value="{{ item.system.quantity }}"
@@ -442,6 +440,9 @@
442440
/>
443441
{{else}}
444442
<div class="item-detail">{{ item.system.quantity }}</div>
443+
{{/notequal}}
444+
{{else}}
445+
<div class="item-detail">{{ item.system.quantity }}</div>
445446
{{/if}}
446447
{{#if @root.editable}} {{#notequal item.type "container"}}
447448
<a

0 commit comments

Comments
 (0)