added techniques type list checkboxes
This commit is contained in:
@@ -10,6 +10,7 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
|
||||
sheetData.data.dtypes = ["String", "Number", "Boolean"];
|
||||
sheetData.data.stances = CONFIG.l5r5e.stances;
|
||||
sheetData.data.techniquesList = CONFIG.l5r5e.techniques;
|
||||
|
||||
return sheetData;
|
||||
}
|
||||
@@ -37,6 +38,13 @@ export class BaseSheetL5r5e extends ActorSheet {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
// Check if technique is allowed
|
||||
if (item.data.type === "technique") {
|
||||
// TODO Verifier que la technique est possible pour ce persos ? technique_type / techniques.kata
|
||||
//console.log(item.data.data.technique_type, this.actor.data.data.techniques);
|
||||
//return Promise.resolve();
|
||||
}
|
||||
|
||||
// Ok add item
|
||||
return super._onDrop(event);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
|
||||
/**
|
||||
* Sub Types of advancements
|
||||
*/
|
||||
static types = ["ring", "skill", "advantage"]; // "technique" has it's own type
|
||||
static types = ["ring", "skill"]; // "advantage" and "technique" have theirs own xp count
|
||||
|
||||
/** @override */
|
||||
static get defaultOptions() {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<input class="centered-input select-on-focus" type="number" name="data.rings.earth" value="{{data.rings.earth}}" data-dtype="Number" min="1" max="9" placeholder="0"/>
|
||||
</label>
|
||||
</li>
|
||||
<li id="air">
|
||||
<li id="air">
|
||||
<label class="attribute-label air centered-input">
|
||||
<i class="i_air"></i>
|
||||
<strong>{{ localizeRing 'air' }}</strong>
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
<div class="techniques-wrapper">
|
||||
{{#each actor.data.techniquesList as |technique|}}
|
||||
<label>
|
||||
<input type="checkbox" name="data.techniques.{{technique}}" {{checked (lookup ../actor.data.techniques technique)}} />
|
||||
{{localizeTechnique technique}}
|
||||
</label>
|
||||
{{/each}}
|
||||
|
||||
<fieldset class="section-header flexrow">
|
||||
<legend class="technique-controls">
|
||||
{{ localize 'l5r5e.techniques.title' }}
|
||||
|
||||
Reference in New Issue
Block a user