Armes/Protections/Equipement

This commit is contained in:
sladecraven 2022-10-24 15:39:09 +02:00
parent c2a9beea89
commit 3b10ac18c2
8 changed files with 174 additions and 181 deletions

View File

@ -122,7 +122,8 @@ export class HawkmoonUtility {
'systems/fvtt-hawkmoon-cyd/templates/editor-notes-gm.html', 'systems/fvtt-hawkmoon-cyd/templates/editor-notes-gm.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html', 'systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html', 'systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html' 'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html'
] ]
return loadTemplates(templatePaths); return loadTemplates(templatePaths);
} }

View File

@ -713,6 +713,12 @@ ul, li {
flex-grow: 0; flex-grow: 0;
} }
.numeric-input {
text-align: right;
direction: rtl;
padding: 5px;
}
.input-numeric-short { .input-numeric-short {
width: 40px; width: 40px;
max-width: 40px; max-width: 40px;
@ -1324,11 +1330,13 @@ ul, li {
min-width: 9rem; min-width: 9rem;
} }
.item-field-label-short { .item-field-label-short {
padding-top: 6px;
flex-grow:1; flex-grow:1;
max-width: 4rem; max-width: 4rem;
min-width: 4rem; min-width: 4rem;
} }
.item-field-label-medium { .item-field-label-medium {
padding-top: 6px;
flex-grow:1; flex-grow:1;
max-width: 6rem; max-width: 6rem;
min-width: 6rem; min-width: 6rem;
@ -1339,11 +1347,17 @@ ul, li {
max-width: 8rem; max-width: 8rem;
min-width: 8rem; min-width: 8rem;
} }
.item-field-label-long2 {
padding-top: 6px;
flex-grow:1;
max-width: 20rem;
min-width: 20rem;
}
.item-control-end { .item-control-end {
align-self: flex-end; align-self: flex-end;
} }
.alternate-list { .alternate-list {
margin-top: 4px; margin-top: 2px;
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.item-filler { .item-filler {

View File

@ -101,6 +101,13 @@
"templates": { "templates": {
"base": { "base": {
"description": "" "description": ""
},
"basequip": {
"prixpo": 0,
"prixca": 0,
"prixsc": 0,
"rarete": 0,
"equipped": false
} }
}, },
"types": [ "types": [
@ -149,10 +156,9 @@
] ]
}, },
"equipement": { "equipement": {
"rarete": 0,
"prix": 0,
"templates": [ "templates": [
"base" "base",
"basequip"
] ]
}, },
"competence": { "competence": {
@ -168,35 +174,34 @@
}, },
"arme": { "arme": {
"typearme": "", "typearme": "",
"isdefense": false,
"bonusmaniementoff": 0, "bonusmaniementoff": 0,
"bonusmaniementdef": 0, "seuildefense": 0,
"onlevelonly": false,
"degats": "", "degats": "",
"deuxmains": false, "deuxmains": false,
"percearmure": false,
"percearmurevalue": 0,
"courte": 0, "courte": 0,
"moyenne": 0, "moyenne": 0,
"longue": 0, "longue": 0,
"tr": 0, "tr": 0,
"rarete": 0,
"prix": 0,
"equipped": false,
"templates": [ "templates": [
"base" "base",
"basequip"
] ]
}, },
"protection": { "protection": {
"typeprotection": "",
"protection": 0, "protection": 0,
"rarete": 0, "adversitepoids" :0,
"prix": 0,
"equipped": false,
"templates": [ "templates": [
"base" "base",
"basequip"
] ]
}, },
"monnaie": { "monnaie": {
"templates": [ "templates": [
"base" "base",
"basequip"
] ]
}, },
"artefact": { "artefact": {
@ -211,7 +216,8 @@
"avantages": "", "avantages": "",
"competences": "", "competences": "",
"templates": [ "templates": [
"base" "base",
"basequip"
] ]
} }

View File

@ -1,84 +1,94 @@
<form class="{{cssClass}}" autocomplete="off"> <form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header"> <header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/> <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields"> <div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div> </div>
</header> </header>
{{!-- Sheet Body --}} {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
<section class="sheet-body">
<div class="flexcol"> {{!-- Sheet Body --}}
<span class="flexrow"> <section class="sheet-body">
<label class="generic-label">Type d'arme : </label>
<select class="status-small-label color-class-common" type="text" name="system.typearme" value="{{data.typearme}}" data-dtype="string" > {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{#select data.typearme}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
<li class="flexrow item">
<label class="generic-label item-field-label-long">Type d'arme : </label>
<select class="item-field-label-long" type="text" name="system.typearme"
value="{{system.typearme}}" data-dtype="string">
{{#select system.typearme}}
<option value="contact">Arme de contact</option> <option value="contact">Arme de contact</option>
<option value="contactjet">Arme de contact et de Jet</option> <option value="contactjet">Arme de contact et de Jet</option>
<option value="jet">Arme de Jet</option> <option value="jet">Arme de Jet</option>
<option value="tir">Arme de Tir</option> <option value="tir">Arme de Tir</option>
{{/select}} {{/select}}
</select> </select>
</span> </li>
<span class="flexrow"> <li class="flexrow item">
<label class="generic-label">Bonus de maniement (offensif) : </label> <label class="generic-label item-field-label-long">Bonus offensif : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.bonusmaniementoff" value="{{data.bonusmaniementoff}}" data-dtype="Number" /> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.bonusmaniementoff"
</span> value="{{system.bonusmaniementoff}}" data-dtype="Number" />
<span class="flexrow"> </li>
<label class="generic-label">Défensive ? </label> <li class="flexrow item">
<input type="checkbox" name="system.isdefense" {{checked data.isdefense}}/> <label class="generic-label item-field-label-long">Seuil de Défense : </label>
</span> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.seuildefense"
{{#if data.isdefense}} value="{{system.seuildefense}}" data-dtype="Number" />
<span class="flexrow"> </li>
<label class="generic-label">Bonus de maniement (défensif) : </label> <li class="flexrow item">
<input type="text" class="padd-right status-small-label color-class-common" name="system.bonusmaniementdef" value="{{data.bonusmaniementdef}}" data-dtype="Number" /> <label class="generic-label item-field-label-long2">1 niveau de Combativité au maximum ? </label>
</span> <input type="checkbox" name="system.onlevelonly" {{checked system.onlevelonly}} />
</li>
{{#if system.onlevelonly}}
{{else}}
<li class="flexrow item">
<label class="generic-label item-field-label-long">Dégâts : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.degats"
value="{{system.degats}}" data-dtype="Number" />
</li>
{{/if}} {{/if}}
<span class="flexrow"> <li class="flexrow item">
<label class="generic-label">Dégâts : </label> <label class="generic-label item-field-label-long">A deux mains ? </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.degats" value="{{data.degats}}" data-dtype="String" /> <input type="checkbox" name="system.deuxmains" {{checked system.deuxmains}} />
</span> </li>
<span class="flexrow"> <li class="flexrow item">
<label class="generic-label">Dégâts non létaux ? </label> <label class="generic-label item-field-label-long">Perce Armure ? </label>
<input type="checkbox" name="system.nonletaux" {{checked data.nonletaux}}/> <input type="checkbox" name="system.percearmure" {{checked system.percearmure}} />
</span> </li>
<span class="flexrow"> {{#if system.percearmure}}
<label class="generic-label">Equipé ? </label> <li class="flexrow item">
<input type="checkbox" name="system.equipped" {{checked data.equipped}}/> <label class="generic-label item-field-label-long2">Valeur de Perce Armure : </label>
</span> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.percearmurevalue"
<span class="flexrow"> value="{{system.percearmurevalue}}" data-dtype="Number" />
<label class="generic-label">A deux mains ? </label> </li>
<input type="checkbox" name="system.deuxmains" {{checked data.deuxmains}}/> {{/if}}
</span> <li class="flexrow item">
<span class="flexrow"> <label class="generic-label item-field-label-long">Portée courte </label>
<label class="generic-label">Portée courte </label> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.courte"
<input type="text" class="padd-right status-small-label color-class-common" name="system.courte" value="{{data.courte}}" data-dtype="Number" /> value="{{system.courte}}" data-dtype="Number" />
</span> </li>
<span class="flexrow"> <li class="flexrow item">
<label class="generic-label">Portée moyenne </label> <label class="generic-label item-field-label-long">Portée moyenne </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.moyenne" value="{{data.moyenne}}" data-dtype="Number" /> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.moyenne"
</span> value="{{system.moyenne}}" data-dtype="Number" />
<span class="flexrow"> </li>
<label class="generic-label">Portée longue </label> <li class="flexrow item">
<input type="text" class="padd-right status-small-label color-class-common" name="system.longue" value="{{data.longue}}" data-dtype="Number" /> <label class="generic-label item-field-label-long">Portée longue </label>
</span> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.longue"
<span class="flexrow"> value="{{system.longue}}" data-dtype="Number" />
<label class="generic-label">Temps de rechargement </label> </li>
<input type="text" class="padd-right status-small-label color-class-common" name="system.tr" value="{{data.tr}}" data-dtype="Number" /> <li class="flexrow item">
</span> <label class="generic-label item-field-label-long2">Temps de rechargement </label>
<span class="flexrow"> <input type="text" class="padd-right numeric-input item-field-label-short" name="system.tr" value="{{system.tr}}"
<label class="generic-label">Rareté </label> data-dtype="Number" />
<input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" /> </li>
</span>
<span class="flexrow">
<label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}} {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</div> </div>
</section> </section>
</form> </form>

View File

@ -1,43 +0,0 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="flexcol">
<span class="flexrow">
<label class="generic-label">Bonus de défense : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.bonusdefense" value="{{data.bonusdefense}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Degats : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.degats" value="{{data.degats}}" data-dtype="String" />
</span>
<span class="flexrow">
<label class="generic-label">Dégâts non létaux ? </label>
<input type="checkbox" name="system.nonletaux" {{checked data.nonletaux}}/>
</span>
<span class="flexrow">
<label class="generic-label">Equipé ? </label>
<input type="checkbox" name="system.equipped" {{checked data.equipped}}/>
</span>
<span class="flexrow">
<label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span>
{{> systems/fvtt-mournblade/templates/partial-item-description.html}}
</div>
</section>
</form>

View File

@ -6,25 +6,21 @@
</div> </div>
</header> </header>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
<ul class="item-list alternate-list">
<li class="flexrow item">
<label class="generic-label item-field-label-long">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-long" name="system.rarete"
value="{{data.rarete}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common item-field-label-long" name="system.prix"
value="{{data.prix}}" data-dtype="Number" />
</li>
</ul>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}} {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</ul>
</div> </div>
</section> </section>

View File

@ -6,13 +6,22 @@
</div> </div>
</header> </header>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
<div class="flexcol">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}} {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</ul>
</div> </div>
</section> </section>

View File

@ -1,35 +1,35 @@
<form class="{{cssClass}}" autocomplete="off"> <form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header"> <header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/> <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields"> <div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div> </div>
</header> </header>
{{!-- Sheet Body --}} {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
<section class="sheet-body">
<div class="flexcol"> {{!-- Sheet Body --}}
<span class="flexrow"> <section class="sheet-body">
<label class="generic-label">Protection : </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.protection" value="{{data.protection}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Equipé ? </label>
<input type="checkbox" name="system.equipped" {{checked data.equipped}}/>
</span>
<span class="flexrow">
<label class="generic-label">Rareté </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.rarete" value="{{data.rarete}}" data-dtype="Number" />
</span>
<span class="flexrow">
<label class="generic-label">Prix </label>
<input type="text" class="padd-right status-small-label color-class-common" name="system.prix" value="{{data.prix}}" data-dtype="Number" />
</span>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}} {{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
<li class="flexrow item">
<label class="generic-label item-field-label-long">Protection : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.protection"
value="{{system.protection}}" data-dtype="Number" />
</li>
<li class="flexrow item">
<label class="generic-label item-field-label-long2">Adversités dues au poids : </label>
<input type="text" class="padd-right numeric-input item-field-label-short" name="system.adversitepoids"
value="{{system.adversitepoids}}" data-dtype="Number" />
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
</div> </div>
</section> </section>
</form> </form>