fvtt-cthulhu-eternal/templates/character-items.hbs

103 lines
5.8 KiB
Handlebars
Raw Normal View History

<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend data-tooltip="{{localize "TENEBRIS.Tooltip.learnedTalents"}}" data-tooltip-direction="UP">{{localize "TENEBRIS.Label.talents"}}</legend>
<div class="talents">
{{#if @root.isEditMode}}
{{#each talents as |item|}}
{{!log "path-talent" this}}
<div class="talent {{#if item.appris}}appris{{/if}}" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.description}}}<br><br>{{item.path}}" data-tooltip-direction="UP">{{item.name}}
{{#if item.progression}}<span data-tooltip="{{localize 'TENEBRIS.Label.progressionPossible'}}"> (P)</span>{{/if}}
{{#if (and item.progression (gt item.niveau 1))}}{{localize 'TENEBRIS.Label.level'}} {{item.niveau}}{{/if}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'TENEBRIS.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'TENEBRIS.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
{{else}}
{{#each talentsAppris as |item|}}
{{!log "path-talent appris" this}}
<div class="talent" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{{item.description}}}<br><br>{{item.path}}">
{{#if (ne item.img "icons/svg/item-bag.svg")}}
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
{{/if}}
{{item.name}} {{item.details}}
</div>
{{/each}}
{{/if}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "TENEBRIS.Label.equipement"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize "TENEBRIS.Tooltip.addEquipment"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createEquipment"></i></a>{{/if}}</legend>
<div class="weapons">
{{#each weapons as |item|}}
{{!log 'weapon' this}}
<div class="weapon" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true" data-drag-type="damage">
{{#if (ne item.img "icons/svg/item-bag.svg")}}
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
{{/if}}
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<a {{#if (ne item.system.degats "1")}}class="rollable" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage" data-roll-value="{{item.system.degats}}"{{/if}}>{{localize "TENEBRIS.Label.degats"}} : {{item.system.degats}}</a>
{{#if @root.isEditMode}}
<div class="controls">
<a data-tooltip="{{localize 'TENEBRIS.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'TENEBRIS.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
{{/if}}
</div>
{{/each}}
</div>
<div class="armors">
{{#each armors as |item|}}
{{!log 'armor' this}}
<div class="armor" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
{{localize "TENEBRIS.Label.armor"}} : {{item.system.valeur}} {{localize "TENEBRIS.Label.malus"}} : {{item.system.malus}}
{{#if @root.isEditMode}}
<div class="controls">
<a data-tooltip="{{localize 'TENEBRIS.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'TENEBRIS.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
{{/if}}
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "TENEBRIS.Label.biens"}}</legend>
{{formInput systemFields.biens enriched=enrichedBiens value=system.biens name="system.biens" toggled=true }}
</fieldset>
{{#if (or isEditMode (and isPlayMode hasSpells))}}
<fieldset>
<legend>{{localize "TENEBRIS.Label.spells"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize "TENEBRIS.Tooltip.addSpell"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createSpell"></i></a>{{/if}}</legend>
<div class="spells">
{{#each spells as |item|}}
{{!log 'weapon' this}}
<div class="spell" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true" data-drag-type="spell">
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
{{#if @root.isEditMode}}
<div class="controls">
<a data-tooltip="{{localize 'TENEBRIS.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'TENEBRIS.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
{{/if}}
</div>
{{/each}}
</div>
</fieldset>
{{/if}}
</section>