zischenstand
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<p>
|
||||
{{localize "ls.priceModifierText"}}
|
||||
<i class='fa fa-question-circle' title='{{localize "ls.priceModifierTooltip"}}'></i>
|
||||
</p>
|
||||
<p>
|
||||
<input name="price-modifier-percent" id="price-modifier-percent" type="range" min="0" max="200" value="{{priceModifier}}" class="slider">
|
||||
</p>
|
||||
<p>
|
||||
<label>{{localize "ls.percentage"}}:</label> <input type=number min="0" max="200" value="{{priceModifier}}" id="price-modifier-percent-display">
|
||||
</p>
|
||||
<script>
|
||||
var pmSlider = document.getElementById("price-modifier-percent");
|
||||
var pmDisplay = document.getElementById("price-modifier-percent-display");
|
||||
pmDisplay.value = pmSlider.value;
|
||||
pmSlider.oninput = function() { pmDisplay.value = this.value; };
|
||||
pmDisplay.oninput = function() { pmSlider.value = this.value; };
|
||||
</script>
|
||||
105
src/modules/lootsheetnpcpf1/template/npc-sheet-gmpart.html
Normal file
105
src/modules/lootsheetnpcpf1/template/npc-sheet-gmpart.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<h3 class="gm-section">{{localize "ls.gmSettings"}}</h3>
|
||||
|
||||
<!-- GM SETTINGS -->
|
||||
<div class="gm-settings" data-group="sidebar" data-tab="gm-settings">
|
||||
<h3 class="gm-header"><i class="fas fa-id-card"></i> {{localize "ls.type"}} <i class="fas fa-info-circle help" onclick="$('.sheet-type-info').toggle();"></i></h3>
|
||||
<div class="sheet-type-info">{{localize "ls.typeInfo"}}</div>
|
||||
<div class="sheet-types">
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4 class="sheet-name">{{localize "ls.typeOfSheet"}}:</h4></div>
|
||||
<div class="flexcol">
|
||||
<select class="sheet-type" name="flags.lootsheetnpcpf1.lootsheettype">
|
||||
{{#select flags.lootsheetnpcpf1.lootsheettype}}
|
||||
<option value="Loot">{{localize "ls.typeLoot"}}</option>
|
||||
<option value="Merchant">{{localize "ls.typeMerchant"}}</option>
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="gm-header"><i class="fas fa-users"></i> {{localize "ls.permissions"}} <i class="fas fa-info-circle help" onclick="$('.permission-info').toggle();"></i></h3>
|
||||
<div class="permission-info">{{localize "ls.permissionsInfo"}}</div>
|
||||
{{#if flags.loot.warning}}
|
||||
<div class="warning">{{localize "ERROR.lsInvalidParentPermission"}}</div>
|
||||
{{/if}}
|
||||
{{#unless flags.loot.warning}}
|
||||
<ol class="permissions-list">
|
||||
{{#each flags.loot.players as |player p|}}
|
||||
<li class="permission">
|
||||
<input type="hidden" name="{{player.playerId}}" value="{{player.lootPermission}}" data-dtype="Number" actor="{{player.actorId}}"/>
|
||||
<a class="permission-proficiency" title="{{player.lootPermissionDescription}}">{{{player.icon}}}</a>
|
||||
<h4 class="permission-name">{{player.actor}} ({{player.name}})</h4>
|
||||
</li>
|
||||
{{/each}}
|
||||
<div class="batch-update">{{localize "ls.batchUpdate"}}
|
||||
<a class="permission-batch" title="{{localize "ls.permissionNoaccess"}}" data-perm="0"><i class="far fa-circle"></i></a>
|
||||
<a class="permission-batch" title="{{localize "ls.permissionLimited"}}" data-perm="1"><i class="fas fa-eye"></i></a>
|
||||
<a class="permission-batch" title="{{localize "ls.permissionObserver"}}" data-perm="2"><i class="fas fa-check"></i></a>
|
||||
</div>
|
||||
</ol>
|
||||
{{/unless}}
|
||||
|
||||
{{#ifeq lootsheettype "Loot"}}
|
||||
<h3 class="gm-header"><i class="fas fa-tools"></i> {{localize "ls.lsOptions"}}</h3>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.enableDragging"}} <i class="fas fa-info-circle help" title="{{localize "ls.enableDraggingTooltip"}}"></i></h4></div>
|
||||
<div class="flexcol"><input name="data.flags.lootsheetnpcpf1.dragEnabled" type="checkbox" value="{{flags.lootsheetnpcpf1.dragEnabled}}" {{#if flags.lootsheetnpcpf1.dragEnabled}}checked{{/if}} /></div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.maxCapacity"}} <i class="fas fa-info-circle help" title="{{localize "ls.maxCapacityTooltip"}}"></i></h4></div>
|
||||
<div class="flexcol"><input name="data.flags.lootsheetnpcpf1.maxCapacity" type="text" data-dtype="Number" placeholder="e.g. 10" value="{{flags.lootsheetnpcpf1.maxCapacity}}"/></div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.maxLoad"}} <i class="fas fa-info-circle help" title="{{localize "ls.maxLoadTooltip"}}"></i></h4></div>
|
||||
<div class="flexcol"><input name="data.flags.lootsheetnpcpf1.maxLoad" type="text" data-dtype="Number" placeholder="e.g. 200" value="{{flags.lootsheetnpcpf1.maxLoad}}"/></div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.saleValue"}}<i class="fas fa-info-circle help" title="{{localize "ls.saleValueTooltip"}}"></i></h4></div>
|
||||
<div class="flexcol"><input name="data.flags.lootsheetnpcpf1.saleValue" type="text" data-dtype="Number" placeholder="e.g. 50" value="{{flags.lootsheetnpcpf1.saleValue}}"/></div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.displaySaleValue"}} <i class="fas fa-info-circle help" title="{{localize "ls.displaySaleValueTooltip"}}"></i></h4></div>
|
||||
<div class="flexcol"><input name="data.flags.lootsheetnpcpf1.displaySaleValueEnabled" type="checkbox" value="{{flags.lootsheetnpcpf1.displaySaleValueEnabled}}" {{#if flags.lootsheetnpcpf1.displaySaleValueEnabled}}checked{{/if}} /></div>
|
||||
</div>
|
||||
<h3 class="gm-header"><i class="fas fa-coins"></i> {{localize "ls.coinDistribution"}}</h3>
|
||||
<ol class="coins-list">
|
||||
{{#each flags.loot.currency as |c i|}}
|
||||
<li class="denomination {{i}}">
|
||||
<label>{{ lookup ../config.currencies i }}:</label>
|
||||
<h4 class="denomination-value">{{c}} {{localize "ls.each"}}</h4>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
<button class= "split-coins" type="split-coins" name="split-coins" value="1"><i class="fa fa-coins"></i> {{localize "ls.splitBy"}} {{flags.loot.ownerCount}}</button>
|
||||
{{/ifeq}}
|
||||
|
||||
{{#ifeq lootsheettype "Merchant"}}
|
||||
<h3 class="gm-header"><i class="fas fa-balance-scale"></i> {{localize "ls.merchantSettings"}} <i class="fas fa-info-circle help" onclick="$('.merchant-settings-info').toggle();"></i></h3>
|
||||
<div class="merchant-settings-info">{{localize "ls.merchantInfo"}}</div>
|
||||
<div class="merchant-settings">
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.rollableTable"}}: </h4></div>
|
||||
<div class="flexcol">
|
||||
<select class="sheet-rolltable" name="flags.lootsheetnpcpf1.rolltable">
|
||||
<option value="">{{localize "ls.chooseTable"}}</option>
|
||||
{{#select flags.lootsheetnpcpf1.rolltable}}
|
||||
{{#each rolltables as |table i|}}
|
||||
<option value="{{table.name}}">{{table.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.shopQtyFormula"}}: </h4></div>
|
||||
<div class="flexcol"><input name="flags.lootsheetnpcpf1.shopQty" type="text" data-dtype="String" placeholder="e.g. 1d20" value="{{flags.lootsheetnpcpf1.shopQty}}"/></div>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<div class="flexcol"><h4>{{localize "ls.itemQtyFormula"}}: </h4></div>
|
||||
<div class="flexcol"><input name="flags.lootsheetnpcpf1.itemQty" type="text" data-dtype="String" placeholder="e.g. 1d4" value="{{flags.lootsheetnpcpf1.itemQty}}"/></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="update-inventory" type="update-inventory" name="update-inventory" value="1"><i class="fas fa-balance-scale"></i> {{localize "ls.updateShopInventory"}} </button>
|
||||
{{/ifeq}}
|
||||
</div>
|
||||
194
src/modules/lootsheetnpcpf1/template/npc-sheet.html
Normal file
194
src/modules/lootsheetnpcpf1/template/npc-sheet.html
Normal file
@@ -0,0 +1,194 @@
|
||||
<form class="pf1 {{cssClass}}" autocomplete="off">
|
||||
|
||||
<!-- HEADER -->
|
||||
<header class="sheet-header flexrow">
|
||||
<h1 class="charname">
|
||||
<input name="name" type="text" value="{{actor.name}}" placeholder="{{localize "ls.lootName"}}" />
|
||||
</h1>
|
||||
|
||||
{{#if isGM}}
|
||||
{{#ifeq lootsheettype "Merchant"}}
|
||||
<div class="charbutton">
|
||||
<button class="price-modifier" type="price-modifier" name="price-modifier" value=""><i class="fa fa-balance-scale"></i> {{localize "ls.priceModifierTitle"}}</button>
|
||||
</div>
|
||||
{{/ifeq}}
|
||||
{{#ifeq lootsheettype "Loot"}}
|
||||
<div class="charbutton">
|
||||
<button class="convert-loot" type="convert-loot" name="convert-loot" value=""><i class="fa fa-coins"></i> {{localize "ls.convertLootTitle"}}</button>
|
||||
</div>
|
||||
{{/ifeq}}
|
||||
{{/if}}
|
||||
|
||||
</header>
|
||||
|
||||
<section class="sheet-lower flexrow">
|
||||
|
||||
<!-- SIDEBAR -->
|
||||
<section class="sheet-sidebar sidebar">
|
||||
<div class="sheet-profile-img">
|
||||
{{#if isGM}}<img class="sheet-profile-small" src="{{actor.img}}" title="{{actor.name}}" data-edit="img" />{{/if}}
|
||||
{{#unless isGM}}<img class="sheet-profile" src="{{actor.img}}" title="{{actor.name}}" data-edit="img" />{{/unless}}
|
||||
</div>
|
||||
{{#if isGM}} {{> "modules/lootsheetnpcpf1/template/npc-sheet-gmpart.html"}} {{/if}}
|
||||
</section>
|
||||
|
||||
<!-- BODY -->
|
||||
<section class="sheet-content content">
|
||||
{{#unless actor.visible}}
|
||||
<span class="warning">{{localize "ls.noAccesToSheet"}}</span>
|
||||
{{/unless}}
|
||||
|
||||
{{#if actor.visible}}
|
||||
<div class="flexcol active">
|
||||
<nav class="sheet-navigation tabs" data-group="primary">
|
||||
<a class="item active" data-tab="inventory">{{localize "ls.inventory"}}</a>
|
||||
<a class="item" data-tab="biography">{{localize "ls.biography"}}</a>
|
||||
</nav>
|
||||
<section class="primary-body">
|
||||
|
||||
<div class="tab biography" data-tab="biography" data-group="primary">
|
||||
{{editor content=data.details.biography.value target="data.details.biography.value" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
<div class="tab inventory active" data-tab="inventory" data-group="primary">
|
||||
|
||||
<!-- FEATURES -->
|
||||
<div class="features" data-group="primary" data-tab="features">
|
||||
{{#ifeq lootsheettype "Loot"}}
|
||||
<div class="inventory-filters">
|
||||
<ol class="currency flexrow">
|
||||
<h3>
|
||||
{{localize "PF1.Currency"}}
|
||||
</h3>
|
||||
{{#each data.currency as |v k|}}
|
||||
<label class="denomination {{k}}">{{ lookup ../config.currencies k }}</label>
|
||||
<input type="text" name="data.currency.{{k}}" value="{{v}}" data-dtype="Number"/>
|
||||
<label class="item currency-controls" data-item-id="{{k}}">
|
||||
{{#if ../canAct}}
|
||||
{{#unless ../../isGM}}
|
||||
<a class="currency-controls item-control item-loot" title="{{localize "ls.lootCoins"}}"><i class="fas fa-gem"></i></a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</label>
|
||||
{{/each}}
|
||||
</ol>
|
||||
<ol class="currency flexrow">
|
||||
<h3>
|
||||
{{localize "PF1.WeightlessCurrency"}}
|
||||
</h3>
|
||||
{{#each data.altCurrency as |v k|}}
|
||||
<label class="denomination {{k}}">{{ lookup ../config.currencies k }}</label>
|
||||
<input type="text" name="data.altCurrency.{{k}}" value="{{v}}" data-dtype="Number"/>
|
||||
<label class="item currency-controls" data-item-id="wl_{{k}}">
|
||||
{{#if ../canAct}}
|
||||
{{#unless ../../isGM}}
|
||||
<a class="currency-controls item-control item-loot" title="{{localize "ls.lootCoins"}}"><i class="fas fa-gem"></i></a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</label>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
{{/ifeq}}
|
||||
<ul class="inventory-list">
|
||||
{{#each actor.features as |section sid|}}
|
||||
<li class="inventory-header flexrow">
|
||||
<h3 class="item-name flexrow">{{section.label}}</h3>
|
||||
{{#if ../isGM}}
|
||||
<div class="item-detail item-identified"><i class="icon icon-quill-ink large" title="{{localize "PF1.Identified"}}"></i></div>
|
||||
{{/if}}
|
||||
<div class="item-detail item-weight"><i class="icon icon-weight large" src="systems/pf1/icons/actions/weight.svg" title="{{localize "PF1.Weight"}}"></i></div>
|
||||
<div class="item-detail item-weight"><i class="fas fa-coins large" title="{{localize "ls.price"}}"></i></div>
|
||||
<div class="item-controls">
|
||||
{{#if ../isGM}}
|
||||
<a class="item-control item-create" title="{{localize "ls.createItem"}}" data-type="{{section.type}}">
|
||||
<i class="fas fa-plus"></i> {{localize "ls.add"}}
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</li>
|
||||
<ol class="item-list">
|
||||
{{#each section.items as |item iid|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}" data-item-quantity="{{item.data.quantity}}">
|
||||
<div class="item-name flexrow rollable">
|
||||
<div class="item-image" style="background-image: url({{item.img}})"></div>
|
||||
<h4 class="rollable{{#if item.empty}} strikethrough-text{{/if}}">{{ lootsheetname item.name item.data.quantity item.flags.lootsheetnpcpf1.infinite}}</h4>
|
||||
</div>
|
||||
{{#if ../../isGM}}
|
||||
<div class="item-detail item-identified">
|
||||
<a class="item-control item-identify"><span>{{{item.labels.identified}}}</span></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="item-detail item-weight"><span>{{ lootsheetweight item.data.quantity item.data.weightConverted }} {{ ../../weightUnit }}</span></div>
|
||||
<div class="item-detail item-weight"><span>{{ lootsheetprice item.showPrice ../../priceModifier }}<span></div>
|
||||
<div class="item-controls">
|
||||
{{#ifeq ../../lootsheettype "Loot"}}
|
||||
{{#if ../../canAct}}
|
||||
{{#unless ../../isGM}}
|
||||
{{#if data.quantity}}
|
||||
<a class="item-control item-loot" title="{{localize "ls.lootItem"}}"><i class="fas fa-gem"></i></a>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/ifeq}}
|
||||
|
||||
{{#ifeq ../../lootsheettype "Merchant"}}
|
||||
{{#if ../../canAct}}
|
||||
{{#unless ../../isGM}}
|
||||
{{#if data.quantity}}
|
||||
<a class="item-control item-buy" title="{{localize "ls.buyItem"}}"><i class="fas fa-dollar-sign"></i></a>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/ifeq}}
|
||||
|
||||
{{#if ../../isGM}}
|
||||
<a class="item-control item-visibility" title="{{localize "ls.itemToggleVisibility"}}">
|
||||
{{#if item.flags.lootsheetnpcpf1.secret}}<i class="fas fa-eye-slash"></i>{{/if}}
|
||||
{{#unless item.flags.lootsheetnpcpf1.secret}}<i class="fas fa-eye"></i>{{/unless}}
|
||||
</a>
|
||||
{{#unless item.flags.lootsheetnpcpf1.infinite}}
|
||||
<a class="item-control item-quantity-add"><i class="fas fa-plus"></i></a>
|
||||
<a class="item-control item-quantity-subtract"><i class="fas fa-minus"></i></a>
|
||||
<a class="item-control item-quantity-infinite"><i class="fas fa-infinity"></i></a>
|
||||
{{/unless}}
|
||||
{{#if item.flags.lootsheetnpcpf1.infinite}}
|
||||
<a class="item-control item-quantity-infinite enabled"><i class="fas fa-infinity"></i></a>
|
||||
{{/if}}
|
||||
<a class="item-control item-edit" title="{{localize "ls.editItem"}}"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="{{localize "ls.deleteItem"}}"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{#ifeq lootsheettype "Loot"}}
|
||||
<div class="form-group totals">
|
||||
<div class="item-count {{itemsWarning}}">
|
||||
<i class="fas fa-box"> {{localize "ls.totalItems"}}:</i> {{totalItems}} {{maxItems}}
|
||||
</div>
|
||||
<div class="item-weight {{weightWarning}}">
|
||||
<i class="fas fa-weight-hanging"> {{localize "ls.totalWeight"}}:</i> {{totalWeight}} {{maxWeight}} {{weightUnit}}
|
||||
</div>
|
||||
<div class="item-price">
|
||||
<i class="fas fa-coins"> {{localize "ls.totalPrice"}}:</i> {{totalPrice}}
|
||||
</div>
|
||||
{{#if data.flags.lootsheetnpcpf1.displaySaleValueEnabled}}
|
||||
<div class="adjusted-price">
|
||||
<i class="fas fa-coins"> {{localize "ls.adjustedPrice"}}:</i> {{adjustedPrice}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/ifeq}}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
{{/if}}
|
||||
</section>
|
||||
</section>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user