Skip to content

Commit

Permalink
Merge pull request #28 from KageJittai/tweaks
Browse files Browse the repository at this point in the history
More Missing Updates.
  • Loading branch information
jopeek authored May 20, 2020
2 parents 9fbc328 + cc5c0a9 commit 0f5f7ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lootsheetnpc5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ Hooks.once("init", () => {
buyerFundsAsGold += buyerFunds[currency] * conversionRate[currency];
}

if (itemCost >= buyerFundsAsGold) {
if (itemCost > buyerFundsAsGold) {
errorMessageToActor(buyer, `Not enough funds to purchase item.`);
return;
}
Expand Down
19 changes: 8 additions & 11 deletions template/npc-sheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ <h1 class="charname">
{{/if}}
</header>

{{#ifeq lootsheettype "Loot"}}
<style>.item-loot { display: block !important; }</style>
{{/ifeq}}

{{#ifeq lootsheettype "Merchant"}}
<style>.item-buy { display: block !important; }</style>
{{/ifeq}}


<section class="sheet-lower flexrow">

<!-- SIDEBAR -->
Expand Down Expand Up @@ -172,8 +163,14 @@ <h4>
</div>

<div class="item-controls">
<a class="item-control item-buy" title="Buy Item" style="display: none;"><i class="fas fa-dollar-sign"></i></a>
<a class="item-control item-loot" title="Loot Item" style="display: none;"><i class="fas fa-gem"></i></a>
{{#ifeq ../../lootsheettype "Loot"}}
<a class="item-control item-loot" title="Loot Item"><i class="fas fa-gem"></i></a>
{{/ifeq}}

{{#ifeq ../../lootsheettype "Merchant"}}
<a class="item-control item-buy" title="Buy Item"><i class="fas fa-dollar-sign"></i></a>
{{/ifeq}}

{{#if ../../owner}}
<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>
Expand Down

0 comments on commit 0f5f7ea

Please sign in to comment.