ALl items list

This commit is contained in:
LeRatierBretonnien 2023-03-26 08:57:44 +02:00
parent 2e4b018834
commit 6148f73888
6 changed files with 44 additions and 4 deletions

View File

@ -212,7 +212,8 @@
"WH.ui.chargelimited": "Limited",
"WH.ui.magiccharge": "Magic charges",
"WH.ui.chargevalue": "Charge value",
"WH.ui.allitems": "All items",
"WH.ui.bodyslots": "Body",
"WH.ui.containerslot": "Containers",

View File

@ -55,6 +55,7 @@ export class WarheroActorSheet extends ActorSheet {
equippedArmors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedArmors())),
equippedShields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getEquippedShields())),
powers: this.actor.sortPowers(),
allItems: this.actor.getAllItems(),
subActors: duplicate(this.actor.getSubActors()),
competency: this.actor.getCompetency(),
race: duplicate(race),

View File

@ -151,6 +151,11 @@ export class WarheroActor extends Actor {
}
return schools
}
getAllItems() {
let comp = duplicate(this.items || []);
WarheroUtility.sortArrayObjectsByName(comp)
return comp;
}
/* -------------------------------------------- */
getEquippedShields() {
let comp = duplicate(this.items.filter(item => item.type == 'shield' && item.system.slotlocation == "shield") || []);

View File

@ -1543,7 +1543,7 @@ li {
}
.alternate-list {
margin-top: 4px;
fong2ex-wrap: nowrap;
flex-wrap: nowrap;
}
.item-filler {
flex-grow: 6;

View File

@ -107,7 +107,7 @@
"styles": [
"styles/simple.css"
],
"version": "10.0.47",
"version": "10.0.48",
"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.47.zip",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.48.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
"background": "images/ui/warhero_welcome_page.webp",
"id": "fvtt-warhero"

View File

@ -21,11 +21,15 @@
<ul>
<li class="item flexrow list-item " data-item-id="{{race._id}}">
<label class="item-field-label-medium">{{localize "WH.ui.race"}}</label>
{{#if race}}
<a class="item-edit"><img class="sheet-competence-img" src="{{race.img}}"></a>
<input type="text" class="item-field-label-medium" disabled value="{{race.name}}" data-dtype="String" />
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
{{else}}
<a class="item-edit"><img class="sheet-competence-img" src="icons/svg/mystery-man.svg"></a>
{{/if}}
</li>
<li class="item flexrow list-item " data-item-id="{{mainClass._id}}">
<label class="item-field-label-medium">{{localize "WH.ui.class"}}</label>
@ -640,6 +644,35 @@
</div>
<hr>
</article>
{{#if isGM}}
<div>
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long">
<h3><label class="items-title-text">{{localize "WH.ui.allitems"}}</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">{{localize "WH.ui.type"}}</label>
</span>
</li>
{{#each allItems as |item key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{item._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{item.img}}" /></a>
<span class="item-name-label-long">{{item.name}}</span>
<span class="item-field-label-medium">{{upperFirst item.type}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{/if}}
</div>
</section>