Fix: cacher quantite illimite dans les contenants

This commit is contained in:
Vincent Vandemeulebrouck 2023-01-03 01:19:38 +01:00
parent aa5d175027
commit 7ca3306c6f
2 changed files with 8 additions and 6 deletions

View File

@ -12,7 +12,8 @@
<span>{{item.name}}</span> <span>{{item.name}}</span>
</a> </a>
</span> </span>
{{#unless @root.system.illimite}} {{log 'item-inventaire' this}}
{{#unless item.parent.system.illimite}}
<span class="equipement-detail flexrow"> <span class="equipement-detail flexrow">
{{#unless (or (eq item.type 'service') (and (eq item.type 'conteneur') (not vide)))}} {{#unless (or (eq item.type 'service') (and (eq item.type 'conteneur') (not vide)))}}
{{#if @root.options.isOwner}} {{#if @root.options.isOwner}}
@ -35,7 +36,7 @@
{{#if @root.options.isOwner}} {{#if @root.options.isOwner}}
<a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a> <a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
{{#if (or @root.system.illimite (ne item.system.quantite 0))}} {{#if (or item.parent.system.illimite (ne item.system.quantite 0))}}
<a class="item-vendre" title="Vendre"><i class="fas fa-comments-dollar"></i></a> <a class="item-vendre" title="Vendre"><i class="fas fa-comments-dollar"></i></a>
{{/if}} {{/if}}
{{/if}} {{/if}}

View File

@ -5,7 +5,7 @@
<a class="chat-card-button nettoyer-conteneurs">Tout vider</a> <a class="chat-card-button nettoyer-conteneurs">Tout vider</a>
{{/if}} {{/if}}
{{#unless @root.system.illimite}} {{#unless system.illimite}}
{{#if calc.surEncombrementMessage}}<b>{{calc.surEncombrementMessage}}</b> &hyphen;{{/if}} {{#if calc.surEncombrementMessage}}<b>{{calc.surEncombrementMessage}}</b> &hyphen;{{/if}}
Encombrement: {{numberFormat calc.encTotal decimals=2}} Encombrement: {{numberFormat calc.encTotal decimals=2}}
{{#if (regle-optionnelle 'afficher-prix-joueurs')}} {{#if (regle-optionnelle 'afficher-prix-joueurs')}}
@ -16,7 +16,7 @@
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
<li class="competence-header flexrow"> <li class="competence-header flexrow">
<span class="equipement-nom">Nom</span> <span class="equipement-nom">Nom</span>
{{#unless @root.system.illimite}} {{#unless system.illimite}}
<span class="equipement-detail">Quantité</span> <span class="equipement-detail">Quantité</span>
{{/unless}} {{/unless}}
<span class="equipement-detail">Prix (sols)</span> <span class="equipement-detail">Prix (sols)</span>
@ -25,11 +25,12 @@
{{#each objets as |item id|}} {{#each objets as |item id|}}
{{#unless item.estContenu}} {{#unless item.estContenu}}
{{#if (ne item.type 'conteneur')}} {{#if (ne item.type 'conteneur')}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.html" item=item vide=true ouvert=true options=@root.options}} {{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.html"
item=item vide=true ouvert=true options=../options}}
{{/if}} {{/if}}
{{/unless}} {{/unless}}
{{/each}} {{/each}}
{{#each conteneurs as |conteneur id|}} {{#each conteneurs as |conteneur id|}}
{{buildConteneur this 'actor/commerce-inventaire-item.html' @root.options}} {{buildConteneur conteneur 'actor/commerce-inventaire-item.html' ../options}}
{{/each}} {{/each}}
</ul> </ul>