Support des propriétés d'items

Amélioration de l'interface
Améliorations cosmétiques
This commit is contained in:
ZigmundKreud
2021-12-24 04:51:14 +01:00
parent d5a5990faa
commit 7531937e52
59 changed files with 1919 additions and 210 deletions

View File

@ -1,8 +1,8 @@
{{!-- Sheet Header --}}
<header class="sheet-header">
<div class="header-field-group flexrow">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<h1><input class="itemname flex6" name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}" style="border:none; background: lightgray; box-shadow: 5px 5px 5px black;"/>
<h1><input class="itemname flex6" name="name" type="text" value="{{item.name}}" placeholder="Name" style="text-shadow: 3px 3px 5px #333;"/></h1>
</div>
<!-- <img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>-->
<!-- <div class="header-fields">-->

View File

@ -1,62 +1,40 @@
<!--<div class="property flexrow">-->
<!-- <label class="property-label">{{localize "BOL.ui.category"}}</label>-->
<!-- <select name="data.subtype" value="{{data.category}}" data-dtype="String">-->
<!-- {{#select data.category}}-->
<!-- {{#each config.itemCategories as |item id|}}-->
<!-- <option value="{{id}}">{{localize item}}</option>-->
<!-- {{/each}}-->
<!-- {{/select}}-->
<!-- </select>-->
<!--</div>-->
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.subtype"}}</label>
<select name="data.subtype" value="{{data.subtype}}" data-dtype="String">
{{#select data.subtype}}
{{#each config.equipmentCategories as |item id|}}
<option value="{{id}}">{{localize item}}</option>
{{/each}}
{{/select}}
</select>
</div>
<hr/>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.quantity"}}</label>
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.weight"}}</label>
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
</div>
<div class="property flexrow">
<label class="property-label">{{localize "BOL.ui.price"}}</label>
<input type="text" name="data.price" value="{{data.price}}" data-dtype="Number"/>
</div>
<hr/>
<div class="form-group stacked">
<!-- <label>Propriétés</label>-->
<div class="form-group">
<label class="property-label">{{localize "BOL.ui.category"}}</label>
<div class="form-fields">
{{#each data.properties as |property key|}}
<label class="checkbox">
<input type="checkbox" name="data.properties.{{key}}" {{checked property}}> {{localize key}} ({{key}})
</label>
{{/each}}
<select class="field-value" name="data.category" value="{{data.category}}" data-dtype="String">
{{#select data.category}}
{{#each config.itemCategories as |item id|}}
<option value="{{id}}">{{localize item}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
{{#if data.properties.equipable}}
<div class="form-group">
<label class="property-label">Type</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.weapon" {{checked data.properties.weapon}}> {{localize "BOL.itemProperty.weapon"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.protection" {{checked data.properties.protection}}> {{localize "BOL.itemProperty.protection"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.magical" {{checked data.properties.magical}}> {{localize "BOL.itemProperty.magical"}}
</label>
</div>
</div>
{{#if (equals data.category "equipment")}}
{{> "systems/bol/templates/item/parts/properties/item/equipment-properties.hbs"}}
{{/if}}
{{#if data.properties.weapon}}
{{> "systems/bol/templates/item/parts/properties/item/weapon-properties.hbs"}}
{{/if}}
{{#if (equals data.properties.protection)}}
{{#if data.properties.protection}}
{{> "systems/bol/templates/item/parts/properties/item/protection-properties.hbs"}}
{{/if}}
{{#if data.properties.shield}}
{{> "systems/bol/templates/item/parts/properties/item/shield-properties.hbs"}}
{{#if data.properties.magical}}
{{> "systems/bol/templates/item/parts/properties/item/magical-properties.hbs"}}
{{/if}}

View File

@ -1 +0,0 @@
<h3 class="form-header">{{localize "BOL.ui.armor"}}</h3>

View File

@ -1 +1,65 @@
<h3 class="form-header">{{localize "BOL.ui.equipment"}}</h3>
<!--<div class="property flexrow">-->
<!-- <label class="property-label">{{!localize "BOL.ui.subtype"}}</label>-->
<!-- <select name="data.subtype" data-dtype="String">-->
<!-- {{!#select data.subtype}}-->
<!-- {{!#each config.equipmentCategories as |item id|}}-->
<!-- <option value="{{!id}}" {{!#if (equals data.subtype id)}}selected{{!/if}}>{{!localize item}}</option>-->
<!-- {{!/each}}-->
<!-- {{!/select}}-->
<!-- </select>-->
<!--</div>-->
<div class="form-group">
<label class="property-label">{{localize "BOL.ui.subtype"}}</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.equipable" {{checked data.properties.equipable}}> {{localize "BOL.itemProperty.equipable"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.stackable" {{checked data.properties.stackable}}> {{localize "BOL.itemProperty.stackable"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.consumable" {{checked data.properties.consumable}}> {{localize "BOL.itemProperty.consumable"}}
</label>
</div>
</div>
{{#if data.properties.equipable}}
<div class="form-group">
<label>Équipé</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.worn" {{checked data.properties.worn}}> {{localize "BOL.itemProperty.worn"}}
</label>
</div>
</div>
{{/if}}
{{#if data.properties.stackable}}
<div class="form-group">
<label class="property-label">{{localize "BOL.ui.quantity"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.ui.stacksize"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.stacksize" value="{{data.properties.stacksize}}" data-dtype="Number"/>
</div>
</div>
{{/if}}
<!--<div class="form-group">-->
<!-- <label class="property-label">{{!localize "BOL.ui.weight"}}</label>-->
<!-- <div class="form-fields">-->
<!-- <input class="field-value" type="text" name="data.weight" value="{{!data.weight}}" data-dtype="Number"/>-->
<!-- </div>-->
<!--</div>-->
<div class="form-group">
<label class="property-label">{{localize "BOL.ui.price"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.price" value="{{data.price}}" data-dtype="Number"/>
</div>
</div>

View File

@ -0,0 +1 @@
<h3 class="form-header">{{localize "BOL.itemProperty.magical"}}</h3>

View File

@ -1 +0,0 @@
<h3 class="form-header">{{localize "BOL.ui.melee"}}</h3>

View File

@ -1 +1,109 @@
<h3 class="form-header">{{localize "BOL.ui.armor"}}</h3>
<div class="form-group">
<label>{{localize "BOL.ui.subtype"}}</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.armor" {{checked data.properties.armor}}> {{localize "BOL.itemProperty.armor"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.shield" {{checked data.properties.shield}}> {{localize "BOL.itemProperty.shield"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.helm" {{checked data.properties.helm}}> {{localize "BOL.itemProperty.helm"}}
</label>
</div>
</div>
<hr/>
<!--<div class="form-group">-->
<!-- <label>{{!localize "BOL.ui.properties"}}</label>-->
<!-- <div class="form-fields">-->
<!-- <label class="checkbox">-->
<!-- <input class="field-value" type="checkbox" name="data.properties.throwable" {{!checked data.properties.throwable}}> {{!localize "BOL.itemProperty.throwable"}}-->
<!-- </label>-->
<!-- </div>-->
<!--</div>-->
{{#if data.properties.armor}}
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.armorQuality"}}</label>
<div class="form-fields center">
<select class="field-value armorQuality" name="data.properties.armorQuality" data-dtype="String">
{{#select data.properties.armorQuality}}
{{#each config.armorQualities as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.soakFormula"}}</label>
<div class="form-fields">
<input class="field-value soakFormula" type="text" name="data.properties.soak.formula" value="{{data.properties.soak.formula}}" data-dtype="String"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.soakValue"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.soak.value" value="{{data.properties.soak.value}}" data-dtype="Number"/>
</div>
</div>
{{/if}}
{{#if data.properties.helm}}
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.soakModifiers"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.soak.modifier" value="{{data.properties.soak.modifier}}" data-dtype="Number"/>
</div>
</div>
{{/if}}
{{#if data.properties.shield}}
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.blockingMalus"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.blocking.malus" value="{{data.properties.blocking.malus}}" data-dtype="Number"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.blockingAttacksBlocked"}}</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.blocking.blocking1" {{checked data.properties.blocking.blocking1}}> {{localize "BOL.itemProperty.blocking1Attack"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.blocking.blockingAll" {{checked data.properties.blocking.blockingAll}}> {{localize "BOL.itemProperty.blockingAllAttacks"}}
</label>
</div>
</div>
{{/if}}
<hr/>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemModifiers.init"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.modifiers.init" value="{{data.properties.modifiers.init}}" data-dtype="Number"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemModifiers.agility"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.modifiers.agility" value="{{data.properties.modifiers.agility}}" data-dtype="Number"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemModifiers.powercost"}}</label>
<div class="form-fields">
<input class="field-value" type="text" name="data.properties.modifiers.powercost" value="{{data.properties.modifiers.powercost}}" data-dtype="Number"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemModifiers.social"}}</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.modifiers.social" {{checked data.properties.modifiers.social}}>
</label>
</div>
</div>

View File

@ -1 +0,0 @@
<h3 class="form-header">{{localize "BOL.ui.ranged"}}</h3>

View File

@ -1 +0,0 @@
<h3 class="form-header">{{localize "BOL.ui.armor"}}</h3>

View File

@ -1,8 +1,128 @@
<h3 class="form-header">{{localize "BOL.ui.weapon"}}</h3>
<div class="form-group">
<label>{{localize "BOL.ui.subtype"}}</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.melee" {{checked data.properties.melee}}> {{localize "BOL.itemProperty.melee"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.ranged" {{checked data.properties.ranged}}> {{localize "BOL.itemProperty.ranged"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.throwing" {{checked data.properties.throwing}}> {{localize "BOL.itemProperty.throwing"}}
</label>
</div>
</div>
<hr/>
<div class="form-group">
<label>{{localize "BOL.ui.properties"}}</label>
<div class="form-fields">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.throwable" {{checked data.properties.throwable}}> {{localize "BOL.itemProperty.throwable"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.2H" {{checked data.properties.2H}}> {{localize "BOL.itemProperty.2H"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.concealable" {{checked data.properties.concealable}}> {{localize "BOL.itemProperty.concealable"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.ignoreshield" {{checked data.properties.ignoreshield}}> {{localize "BOL.itemProperty.ignoreshield"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.bashing" {{checked data.properties.bashing}}> {{localize "BOL.itemProperty.bashing"}}
</label>
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.reloadable" {{checked data.properties.reloadable}}> {{localize "BOL.itemProperty.reloadable"}}
</label>
</div>
</div>
<hr/>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.attackAttribute"}}</label>
<div class="form-fields center">
<select class="field-value" name="data.properties.attackAttribute" data-dtype="String">
{{#select data.properties.attackAttribute}}
{{#each config.attackAttributes as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.attackAptitude"}}</label>
<div class="form-fields center">
<select class="field-value" name="data.properties.attackAptitude" data-dtype="String">
{{#select data.properties.attackAptitude}}
{{#each config.attackAptitudes as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.attackModifiers"}}</label>
<div class="form-fields center">
<input class="field-value" type="text" name="data.properties.attackModifiers" value="{{data.properties.attackModifiers}}" data-dtype="Number"/>
</div>
</div>
<hr/>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.damage"}}</label>
<div class="form-fields">
<select class="field-value" name="data.properties.damage" data-dtype="String">
{{#select data.properties.damage}}
{{#each config.damageValues as |value id|}}
<option value="{{id}}">{{value}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.damageAttribute"}}</label>
<div class="form-fields center">
<select class="field-value" name="data.properties.damageAttribute" data-dtype="String">
{{#select data.properties.damageAttribute}}
{{#each config.damageAttributes as |value id|}}
<option value="{{id}}">{{localize value}}</option>
{{/each}}
{{/select}}
</select>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.damageModifiers"}}</label>
<div class="form-fields center">
<input class="field-value" type="text" name="data.properties.damageModifiers" value="{{data.properties.damageModifiers}}" data-dtype="Number"/>
</div>
</div>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.damageSpecial"}}</label>
<div class="form-fields center">
<label class="checkbox">
<input class="field-value" type="checkbox" name="data.properties.damageReroll1" {{checked data.properties.damageReroll1}}> {{localize "BOL.itemProperty.damageReroll1"}}
</label>
</div>
</div>
{{#if data.properties.melee}}
{{> "systems/bol/templates/item/parts/properties/melee-properties.hbs"}}
{{#if (or data.properties.throwing (or data.properties.ranged data.properties.throwable))}}
<hr/>
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.range"}}</label>
<div class="form-fields center">
<input class="field-value" type="text" name="data.properties.range" value="{{data.properties.range}}" data-dtype="Number"/>
</div>
</div>
{{/if}}
{{#if data.properties.ranged}}
{{> "systems/bol/templates/item/parts/properties/ranged-properties.hbs"}}
{{#if data.properties.reloadable}}
<div class="form-group">
<label class="property-label">{{localize "BOL.itemProperty.reload"}}</label>
<div class="form-fields center">
<input class="field-value" type="text" name="data.properties.reload" value="{{data.properties.reload}}" data-dtype="Number"/>
</div>
</div>
{{/if}}