Minor changes
This commit is contained in:
parent
7137de0983
commit
d922d77736
@ -179,13 +179,17 @@ export class WarheroActor extends Actor {
|
||||
for (let slotName in game.system.warhero.config.slotNames) {
|
||||
let slotDef = game.system.warhero.config.slotNames[slotName]
|
||||
containers[slotName] = duplicate(slotDef)
|
||||
containers[slotName].content = this.items.filter(it => (it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||
containers[slotName].content = this.items.filter(it => (it.type == 'money' || it.type == 'weapon' || it.type == 'armor' || it.type == 'shield' || it.type == 'equipment')
|
||||
&& it.system.slotlocation == slotName)
|
||||
let slotUsed = 0
|
||||
for (let item of containers[slotName].content) {
|
||||
for (let item of containers[slotName].content) {
|
||||
let q = (item.system.quantity) ? item.system.quantity : 1
|
||||
containers[slotName].nbslots += (item.system.providedslot?? 0) * q
|
||||
slotUsed += item.system.slotused * q
|
||||
if ( item.type == "money") {
|
||||
slotUsed += Math.ceil(item.system.quantity / 1000)
|
||||
} else {
|
||||
slotUsed += item.system.slotused * q
|
||||
}
|
||||
}
|
||||
slotUsed = Math.ceil(slotUsed)
|
||||
containers[slotName].slotUsed = slotUsed
|
||||
|
@ -107,7 +107,7 @@
|
||||
"styles": [
|
||||
"styles/simple.css"
|
||||
],
|
||||
"version": "10.0.31",
|
||||
"version": "10.0.32",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "10",
|
||||
@ -115,7 +115,7 @@
|
||||
},
|
||||
"title": "Warhero RPG",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.31.zip",
|
||||
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.32.zip",
|
||||
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
||||
"background": "images/ui/warhero_welcome_page.webp",
|
||||
"id": "fvtt-warhero"
|
||||
|
@ -240,7 +240,8 @@
|
||||
"language",
|
||||
"condition",
|
||||
"class",
|
||||
"genericitem"
|
||||
"genericitem",
|
||||
"money"
|
||||
],
|
||||
"templates": {
|
||||
"commonclassrace": {
|
||||
@ -264,6 +265,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"money": {
|
||||
"quantity": 0,
|
||||
"slotlocation": "backpack",
|
||||
"description": ""
|
||||
},
|
||||
"genericitem": {
|
||||
"description": ""
|
||||
},
|
||||
|
37
templates/item-money-sheet.html
Normal file
37
templates/item-money-sheet.html
Normal file
@ -0,0 +1,37 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{> systems/fvtt-warhero/templates/partial-item-nav.html}}
|
||||
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
|
||||
{{> systems/fvtt-warhero/templates/partial-item-description.html}}
|
||||
|
||||
|
||||
<div class="tab details" data-group="primary" data-tab="details">
|
||||
<ul>
|
||||
<li class="flexrow"><label class="item-field-label-long ">{{localize "WH.ui.quantity"}}</label>
|
||||
<input type="text" class="item-field-label-long" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
||||
</li>
|
||||
<li class="flexrow"><label class="item-field-label-medium ">{{localize "WH.ui.slotlocation"}}</label>
|
||||
<select class="item-field-label-long " type="text" name="system.slotlocation" value="{{system.slotlocation}}" data-dtype="String">
|
||||
{{#select system.slotlocation}}
|
||||
{{#each config.slotNames as |type key|}}
|
||||
<option value="{{key}}">{{localize type.label}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</form>
|
Reference in New Issue
Block a user