Nouveaux items Arme et Armure (DataModel + feuille + CSS)
Items: - CelestopolWeapon : degats (0/1/2/X), portee (contact/courte/longue), description - CelestopolArmure : protection (1-2), malus (0-2), description Config: - WEAPON_DAMAGE_TYPES et WEAPON_RANGE_TYPES ajoutés dans system.mjs - Enregistrement des DataModels, sheets et templates dans fvtt-celestopol.mjs - system.json : types weapon et armure avec htmlFields UI: - weapon.hbs : badge de dégâts avec hint, sélecteurs portée/dégâts - armure.hbs : blocs protection + malus art-déco - items.less : styles .weapon et .armure i18n: clés Weapon.*, Armure.*, Sheet.weapon, Sheet.armure Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
42
templates/weapon.hbs
Normal file
42
templates/weapon.hbs
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="item-sheet weapon">
|
||||
<header class="item-header">
|
||||
<div class="item-portrait" data-action="editImage">
|
||||
<img src="{{item.img}}" alt="{{item.name}}">
|
||||
</div>
|
||||
<div class="item-header-fields">
|
||||
<input type="text" name="name" value="{{item.name}}" {{#unless isEditable}}disabled{{/unless}}>
|
||||
<div class="item-meta weapon-meta">
|
||||
<div class="form-group">
|
||||
<label>{{localize "CELESTOPOL.Weapon.degats"}}</label>
|
||||
<select name="system.degats" {{#unless isEditable}}disabled{{/unless}}>
|
||||
{{#each damageTypes as |dtype key|}}
|
||||
<option value="{{key}}" {{#if (eq key ../system.degats)}}selected{{/if}}>
|
||||
{{localize dtype.label}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{localize "CELESTOPOL.Weapon.portee"}}</label>
|
||||
<select name="system.portee" {{#unless isEditable}}disabled{{/unless}}>
|
||||
{{#each rangeTypes as |rtype key|}}
|
||||
<option value="{{key}}" {{#if (eq key ../system.portee)}}selected{{/if}}>
|
||||
{{localize rtype.label}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="weapon-damage-badge">
|
||||
<span class="damage-label">{{localize "CELESTOPOL.Weapon.degats"}}</span>
|
||||
<span class="damage-value">{{system.degats}}</span>
|
||||
<span class="damage-hint">{{localize (lookup (lookup damageTypes system.degats) "hint")}}</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group description-group">
|
||||
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user