modif template items
This commit is contained in:
@@ -11,7 +11,7 @@ export class VermineItemSheet extends ItemSheet {
|
|||||||
return foundry.utils.mergeObject(super.defaultOptions, {
|
return foundry.utils.mergeObject(super.defaultOptions, {
|
||||||
classes: ["vermine2047", "sheet", "item"],
|
classes: ["vermine2047", "sheet", "item"],
|
||||||
width: 450,
|
width: 450,
|
||||||
height: "auto",
|
height: "max-content",
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,11 +466,13 @@ export class VermineCombatTracker extends CombatTracker {
|
|||||||
const combatant = combat.combatants.get(li.dataset.combatantId);
|
const combatant = combat.combatants.get(li.dataset.combatantId);
|
||||||
let flag = combatant.getFlag("world", "attitude");
|
let flag = combatant.getFlag("world", "attitude");
|
||||||
if (flag == attitude) {
|
if (flag == attitude) {
|
||||||
return await combatant.setFlag("world", "attitude", null);
|
await combatant.setFlag("world", "attitude", null);
|
||||||
} else {
|
} else {
|
||||||
return await combatant.setFlag("world", "attitude", attitude);
|
await combatant.setFlag("world", "attitude", attitude);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let actor = await game.actors.get(combatant.actorId)
|
||||||
|
console.log(actor, combatant)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +1,19 @@
|
|||||||
<form
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
class="{{cssClass}}"
|
|
||||||
autocomplete="off"
|
|
||||||
>
|
|
||||||
<header class="sheet-header">
|
<header class="sheet-header">
|
||||||
<img
|
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||||
class="profile-img"
|
|
||||||
src="{{item.img}}"
|
|
||||||
data-edit="img"
|
|
||||||
title="{{item.name}}"
|
|
||||||
/>
|
|
||||||
<div class="header-fields">
|
<div class="header-fields">
|
||||||
<h1 class="charname"><input
|
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
||||||
name="name"
|
|
||||||
type="text"
|
|
||||||
value="{{item.name}}"
|
|
||||||
placeholder="Name"
|
|
||||||
/></h1>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
|
||||||
<h4 class="resource flexrow">
|
<h4 class="resource flexrow">
|
||||||
<label class="resource-label ">{{ localize "VERMINE.level"}}</label>
|
<label class="resource-label ">{{ localize "VERMINE.level"}}</label>
|
||||||
<span class="hexa"><input
|
<span class="hexa"><input type="number" name="system.level.value" value="{{system.level.value }}" data-dtype="Number" min="{{system.level.min }}" max="{{system.level.max }}"/></span>
|
||||||
type="number"
|
|
||||||
name="system.level.value"
|
|
||||||
value="{{system.level.value }}"
|
|
||||||
data-dtype="Number"
|
|
||||||
min="{{system.level.min }}"
|
|
||||||
max="{{system.level.max }}"
|
|
||||||
/></span>
|
|
||||||
</h4>
|
</h4>
|
||||||
<h4>description</h4>
|
<h2>description</h2>
|
||||||
|
|
||||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,42 +1,37 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
<header class="sheet-header">
|
{{log this}}
|
||||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
{{> "systems/vermine2047/templates/item/partials/header.hbs"}}
|
||||||
<div class="header-fields">
|
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body ">
|
<section class="sheet-body ">
|
||||||
|
|
||||||
{{> "systems/vermine2047/templates/item/partials/traits.html"}}
|
{{> "systems/vermine2047/templates/item/partials/traits.html"}}
|
||||||
|
<div class="resource align-center flexcol">
|
||||||
|
<label class="resource-label">compétence necessaire
|
||||||
|
<input type="checkbox" data-tooltip="ajouter la vigueur" name="system.needSkill.value" {{#if system.needSkill.value}} checked {{/if}}>
|
||||||
|
</label>
|
||||||
|
{{#if system.needSkill.value}}
|
||||||
|
<select name="system.needSkill.skill" class="skill-select">
|
||||||
|
<option value="">aucune</option>
|
||||||
|
{{#each @root.config.skillCategories as |skillCategory sckey|}}
|
||||||
|
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}">
|
||||||
|
{{#each @root.config.model.Actor.character.skills as |skill key|}}
|
||||||
|
{{#ife skill.category sckey}}
|
||||||
|
<option value="{{key}}" {{#ife key @root.system.needSkill.skill}} selected {{/ife}}>{{ smarttlk 'SKILLS' key 'name' }}</option>
|
||||||
|
|
||||||
|
{{/ife}}
|
||||||
|
{{/each}}
|
||||||
|
</optgroup>
|
||||||
|
{{/each}}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="flexrow">
|
|
||||||
{{!-- Description Tab --}}
|
|
||||||
<div class="resource">
|
|
||||||
<label class="resource-label">Rarity</label>
|
|
||||||
<input type="number" name="system.rarity" value="{{system.rarity}}" data-dtype="Number"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="resource">
|
|
||||||
<label class="resource-label">Reliability</label>
|
|
||||||
<input type="number" name="system.reliability" value="{{system.reliability}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="resource">
|
{{> "systems/vermine2047/templates/item/partials/physicalItems.hbs"}}
|
||||||
<label class="resource-label">Quantity</label>
|
|
||||||
<input type="text" name="system.quantity" value="{{system.quantity}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
<div class="resource">
|
|
||||||
<label class="resource-label">Weight</label>
|
|
||||||
<input type="text" name="system.weight" value="{{system.weight}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h2>Description</h2>
|
|
||||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
|
||||||
|
|
||||||
{{> "systems/vermine2047/templates/item/partials/damages.html"}}
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -9,10 +9,6 @@
|
|||||||
|
|
||||||
|
|
||||||
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}">
|
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}">
|
||||||
{{log "_____________________________________________==========="}}
|
|
||||||
|
|
||||||
{{log @root.config}}
|
|
||||||
|
|
||||||
|
|
||||||
{{#each @root.config.model.Actor.character.skills as |skill key|}}
|
{{#each @root.config.model.Actor.character.skills as |skill key|}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +1,23 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
<header class="sheet-header">
|
{{> "systems/vermine2047/templates/item/partials/header.hbs"}}
|
||||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
|
||||||
<div class="header-fields">
|
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
{{!-- Sheet Tab Navigation --}}
|
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
|
||||||
<a class="item active" data-tab="description">{{ localize "VERMINE.stats" }}</a>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
|
|
||||||
<div class="tab flexrow" data-group="primary" data-tab="description">
|
<div class="tb flexcol">
|
||||||
<aside style="flex:1">
|
|
||||||
<div class="resource">
|
<h4 class="resource">
|
||||||
<label class="resource-label">{{ localize "VERMINE.type"}}</label>
|
<label class="resource-label">{{ localize "VERMINE.type"}}</label>
|
||||||
<select name="system.type" data-dtype="String">
|
<select name="system.type" data-dtype="String">
|
||||||
<option value="physical" {{#if (eq system.type "physical")}}selected{{/if}}>Physiologique</option>
|
<option value="physical" {{#if (eq system.type "physical")}} selected {{/if}}>Physiologique</option>
|
||||||
<option value="psychological" {{#if (eq system.type "psychological")}}selected{{/if}}>Psychologique</option>
|
<option value="psychological" {{#if (eq system.type "psychological")}} selected {{/if}}>Psychologique</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</h4>
|
||||||
</aside>
|
<h2>description</h2>
|
||||||
<main class="editor-wrapper" style="flex:10">
|
{{editor system.description target="system.description" rollData=rollData
|
||||||
{{editor system.description target="system.description" rollData=rollData button=true owner=owner editable=editable}}
|
button=true owner=owner editable=editable}}
|
||||||
</main>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,6 @@
|
|||||||
|
|
||||||
|
|
||||||
{{> "systems/vermine2047/templates/item/partials/physicalItems.hbs"}}
|
{{> "systems/vermine2047/templates/item/partials/physicalItems.hbs"}}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</form>
|
||||||
</form>
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="traits">
|
<div class="traits">
|
||||||
<h3>traits
|
<h3>traits
|
||||||
<span class="traits-selector" data-tooltip="ajouter un trait">
|
<span class="traits-selector" data-tooltip="ajouter/supprimer un trait">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-cogs"></i>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user