Support des propriétés d'items
Amélioration de l'interface d'édition d'items
This commit is contained in:
@@ -11,30 +11,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 data.properties.protection}}
|
||||
{{> "systems/bol/templates/item/parts/properties/item/protection-properties.hbs"}}
|
||||
{{/if}}
|
||||
{{#if data.properties.magical}}
|
||||
{{> "systems/bol/templates/item/parts/properties/item/magical-properties.hbs"}}
|
||||
{{#if (equals data.category "vehicle")}}
|
||||
{{> "systems/bol/templates/item/parts/properties/item/vehicle-properties.hbs"}}
|
||||
{{/if}}
|
||||
|
||||
@@ -1,17 +1,35 @@
|
||||
<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>-->
|
||||
<h3 class="form-header">{{localize "BOL.ui.equipmentProperties"}}</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="property-label">{{localize "BOL.ui.subtype"}}</label>
|
||||
<div class="form-fields">
|
||||
<select name="data.subtype" data-dtype="String">
|
||||
{{#select data.subtype}}
|
||||
{{#each config.itemSubtypes as |item id|}}
|
||||
<option value="{{id}}">{{localize item}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label class="property-label">{{localize "BOL.ui.capacities"}}</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>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label class="property-label">{{localize "BOL.ui.properties"}}</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"}}
|
||||
@@ -24,16 +42,28 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
{{#if data.properties.equipable}}
|
||||
<div class="form-group">
|
||||
<label>Équipé</label>
|
||||
<label>{{localize "BOL.itemProperty.worn"}}</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"}}
|
||||
<input class="field-value" type="checkbox" name="data.worn" {{checked data.worn}}> {{localize "BOL.itemProperty.worn"}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "BOL.itemProperty.slot"}}</label>
|
||||
<div class="form-fields center">
|
||||
<select class="field-value" name="data.properties.slot" data-dtype="String">
|
||||
{{#select data.properties.slot}}
|
||||
{{#each config.equipmentSlots as |value id|}}
|
||||
<option value="{{id}}">{{localize value}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if data.properties.stackable}}
|
||||
@@ -63,3 +93,14 @@
|
||||
<input class="field-value" type="text" name="data.price" value="{{data.price}}" data-dtype="Number"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{#if data.properties.weapon}}
|
||||
{{> "systems/bol/templates/item/parts/properties/item/weapon-properties.hbs"}}
|
||||
{{/if}}
|
||||
{{#if data.properties.protection}}
|
||||
{{> "systems/bol/templates/item/parts/properties/item/protection-properties.hbs"}}
|
||||
{{/if}}
|
||||
{{#if data.properties.magical}}
|
||||
{{> "systems/bol/templates/item/parts/properties/item/magical-properties.hbs"}}
|
||||
{{/if}}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<h3 class="form-header">{{localize "BOL.itemProperty.magical"}}</h3>
|
||||
<h3 class="form-header">{{localize "BOL.itemProperty.magicalProperties"}}</h3>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h3 class="form-header">{{localize "BOL.ui.armor"}}</h3>
|
||||
<h3 class="form-header">{{localize "BOL.ui.protectionProperties"}}</h3>
|
||||
<div class="form-group">
|
||||
<label>{{localize "BOL.ui.subtype"}}</label>
|
||||
<div class="form-fields">
|
||||
|
||||
28
templates/item/parts/properties/item/vehicle-properties.hbs
Normal file
28
templates/item/parts/properties/item/vehicle-properties.hbs
Normal file
@@ -0,0 +1,28 @@
|
||||
<h3 class="form-header">{{localize "BOL.ui.vehicleProperties"}}</h3>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="property-label">{{localize "BOL.ui.subtype"}}</label>
|
||||
<div class="form-fields">
|
||||
<select name="data.subtype" data-dtype="String">
|
||||
{{#select data.subtype}}
|
||||
{{#each config.vehicleSubtypes as |item id|}}
|
||||
<option value="{{id}}">{{localize item}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<label class="property-label">{{localize "BOL.ui.speed"}}</label>
|
||||
<div class="form-fields">
|
||||
<input class="field-value" type="text" name="data.properties.speed" value="{{data.properties.speed}}" 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>
|
||||
@@ -1,6 +1,6 @@
|
||||
<h3 class="form-header">{{localize "BOL.ui.weapon"}}</h3>
|
||||
<h3 class="form-header">{{localize "BOL.ui.weaponProperties"}}</h3>
|
||||
<div class="form-group">
|
||||
<label>{{localize "BOL.ui.subtype"}}</label>
|
||||
<label>{{localize "BOL.ui.reach"}}</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"}}
|
||||
@@ -17,9 +17,6 @@
|
||||
<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>
|
||||
@@ -29,12 +26,19 @@
|
||||
<label class="checkbox">
|
||||
<input class="field-value" type="checkbox" name="data.properties.ignoreshield" {{checked data.properties.ignoreshield}}> {{localize "BOL.itemProperty.ignoreshield"}}
|
||||
</label>
|
||||
{{#if data.properties.ranged}}
|
||||
<label class="checkbox">
|
||||
<input class="field-value" type="checkbox" name="data.properties.reloadable" {{checked data.properties.reloadable}}> {{localize "BOL.itemProperty.reloadable"}}
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#if data.properties.melee}}
|
||||
<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"}}
|
||||
<input class="field-value" type="checkbox" name="data.properties.throwable" {{checked data.properties.throwable}}> {{localize "BOL.itemProperty.throwable"}}
|
||||
</label>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
Reference in New Issue
Block a user