Enhance actor sheet

This commit is contained in:
2024-12-16 09:04:48 +01:00
parent eaba806fec
commit 2ac69e2108
37 changed files with 535 additions and 79 deletions

14
templates/archetype.hbs Normal file
View File

@@ -0,0 +1,14 @@
<section>
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
{{formField systemFields.settings value=system.settings localize=true}}
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput systemFields.description enriched=description value=system.description name="system.description" toggled=true}}
</fieldset>
</section>h

View File

@@ -1,10 +1,10 @@
<section class="tab protagonist-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Character.Label.description"}}</legend>
<legend>{{localize "CTHULHUETERNAL.Label.description"}}</legend>
{{formInput systemFields.description enriched=description value=system.description name="system.description" toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Character.Label.notes"}}</legend>
<legend>{{localize "CTHULHUETERNAL.Label.notes"}}</legend>
{{formInput systemFields.notes enriched=notes value=system.notes name="system.notes" toggled=true}}
</fieldset>
</section>

View File

@@ -1,14 +1,13 @@
<section class="tab protagonist-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.weapon"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize "CTHULHUETERNAL.Tooltip.addWeapon"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createEquipment"></i></a>{{/if}}</legend>
<legend>{{localize "CTHULHUETERNAL.Label.weapons"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "CTHULHUETERNAL.Tooltip.addWeapon"}}" 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}}
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>

View File

@@ -9,6 +9,15 @@
<img class="protagonist-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
data-tooltip="{{actor.name}}" />
</div>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.HP"}}</legend>
<div class="flexrow">
{{formField systemFields.hp.fields.value value=system.hp.value}}
/
{{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=isPlayMode}}
</div>
</fieldset>
</div>
<div class="protagonist-right">
<div class="protagonist-name">
@@ -18,58 +27,87 @@
<i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i>
</a>
</div>
<div class="protagonist-infos">
<div class="protagonist-hp">
<div class="protagonist-hp-value">
{{formField systemFields.hp.fields.value value=system.hp.value}}
</div>
<div class="hp-separator">/</div>
<div class="protagonist-hp-max">
{{formInput systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=isPlayMode}}
</div>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.SAN"}}</legend>
<div class="flexrow">
{{localize "CTHULHUETERNAL.Label.current"}} {{formField systemFields.san.fields.value
value=system.san.value}}
{{localize "CTHULHUETERNAL.Label.max"}} {{formField systemFields.san.fields.max value=system.san.max
rootId=partId disabled=isPlayMode}}
{{localize "CTHULHUETERNAL.Label.recovery"}} {{formField systemFields.san.fields.recovery
value=system.san.recovery}}
<span data-tooltip='{{localize "CTHULHUETERNAL.Tooltip.sanBP"}}'>{{localize "CTHULHUETERNAL.Label.breakingPoint"}}</span> {{formField systemFields.san.fields.breakingPoint
value=system.san.breakingPoint}}
</div>
</div>
<div class="flexrow">
{{localize "CTHULHUETERNAL.Label.violence"}}
{{#each system.san.violence as |violence idx|}}
<input type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}" data-name="violence" {{#if
violence}} checked {{/if}}>
{{/each}}
</div>
<div class="flexrow">
{{localize "CTHULHUETERNAL.Label.helplessness"}}
{{#each system.san.helplessness as |helplessness idx|}}
<input type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}" data-name="helplessness"
{{#if helplessness}} checked {{/if}}>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "CTHULHUETERNAL.Label.willpower"}}</legend>
<div class="flexrow">
{{localize "CTHULHUETERNAL.Label.current"}}{{formField systemFields.wp.fields.value value=system.wp.value}}
{{localize "CTHULHUETERNAL.Label.max"}}{{formField systemFields.wp.fields.max value=system.wp.max rootId=partId disabled=isPlayMode}}
{{localize "CTHULHUETERNAL.Label.exhausted"}}{{formField systemFields.wp.fields.exhausted value=system.wp.exhausted }}
</div>
</fieldset>
</div>
</div>
</fieldset>
<fieldset class="protagonist-characteristics protagonist-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "CTHULHUETERNAL.Label.characteristics"}}</legend>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="save">
<i class="fa fa-question-circle" aria-hidden="true" data-tooltip="{{tooltipsCharacteristic.str}}"
style="font-size: small;"></i>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<label>{{localize "CTHULHUETERNAL.Label.strShort"}}</label>
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
rootId=partId disabled=isPlayMode classes="rollable" dataset=rollType.str}}
{{mul system.characteristics.str.value 5}}
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="save">
<i class="fa fa-question-circle" aria-hidden="true" data-tooltip="{{tooltipsCharacteristic.dex}}"
style="font-size: small;"></i>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<label>{{localize "CTHULHUETERNAL.Label.dexShort"}}</label>
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
rootId=partId disabled=isPlayMode classes="rollable" dataset=rollType.dex}}
{{mul system.characteristics.dex.value 5}}
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="save">
<i class="fa fa-question-circle" aria-hidden="true" data-tooltip="{{tooltipsCharacteristic.dex}}"
style="font-size: small;"></i>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<label>{{localize "CTHULHUETERNAL.Label.conShort"}}</label>
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
rootId=partId disabled=isPlayMode classes="rollable" dataset=rollType.con}}
{{mul system.characteristics.con.value 5}}
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="save">
<i class="fa fa-question-circle" aria-hidden="true" data-tooltip="{{tooltipsCharacteristic.int}}"
style="font-size: small;"></i>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<label>{{localize "CTHULHUETERNAL.Label.intShort"}}</label>
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
rootId=partId disabled=isPlayMode classes="rollable" dataset=rollType.int}}
{{mul system.characteristics.int.value 5}}
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="save">
<i class="fa fa-question-circle" aria-hidden="true" data-tooltip="{{tooltipsCharacteristic.pow}}"
style="font-size: small;"></i>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<label>{{localize "CTHULHUETERNAL.Label.powShort"}}</label>
{{formField systemFields.characteristics.fields.pow.fields.value value=system.characteristics.pow.value
rootId=partId disabled=isPlayMode classes="rollable" dataset=rollType.pow}}
{{mul system.characteristics.pow.value 5}}
</div>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="save">
<i class="fa fa-question-circle" aria-hidden="true" data-tooltip="{{tooltipsCharacteristic.cha}}"
style="font-size: small;"></i>
<div class="protagonist-characteristic" data-drag="true" data-drag-type="characteristic">
<label>{{localize "CTHULHUETERNAL.Label.chaShort"}}</label>
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
rootId=partId disabled=isPlayMode classes="rollable" dataset=rollType.cha}}
{{mul system.characteristics.cha.value 5}}
</div>
</fieldset>

View File

@@ -1,6 +1,6 @@
<section>
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
<img class="item-img era-icon-color" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>