add SteigerungsKategorieField and use it for Kampftalent
This commit is contained in:
parent
0753dd44ab
commit
f296b2280d
@ -5,17 +5,7 @@
|
||||
<div class="grid3 gap">
|
||||
{{>editable-input type="text" name="name" value=item.name placeholder=(localize "DSA41.name")}}
|
||||
<div>
|
||||
<select name="system.steigern">
|
||||
<option value="A_Star" {{#if (eq item.system.steigern "A_Star")}}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.A_Star"}}</option>
|
||||
<option value="A" {{#if (eq item.system.steigern "A") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.A"}} </option>
|
||||
<option value="B" {{#if (eq item.system.steigern "B") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.B"}} </option>
|
||||
<option value="C" {{#if (eq item.system.steigern "C") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.C"}} </option>
|
||||
<option value="D" {{#if (eq item.system.steigern "D") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.D"}} </option>
|
||||
<option value="E" {{#if (eq item.system.steigern "E") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.E"}} </option>
|
||||
<option value="F" {{#if (eq item.system.steigern "F") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.F"}} </option>
|
||||
<option value="G" {{#if (eq item.system.steigern "G") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.G"}} </option>
|
||||
<option value="H" {{#if (eq item.system.steigern "H") }}selected{{/if}}>{{localize "DSA41.kampftalent.steigern.H"}} </option>
|
||||
</select>
|
||||
{{DSA41_input "system.steigern"}}
|
||||
<div class="placeholder">{{localize "DSA41.kampftalent.label_steigern"}}</div>
|
||||
</div>
|
||||
{{>editable-input type="text" name="system.behinderung" value=item.system.behinderung placeholder=(localize "DSA41.talente.label_behinderung")}}
|
||||
|
||||
@ -34,6 +34,18 @@
|
||||
"kreuzer": "Kreuzer"
|
||||
},
|
||||
|
||||
"steigerungskategorie": {
|
||||
"A_Star": "A*",
|
||||
"A": "A",
|
||||
"B": "B",
|
||||
"C": "C",
|
||||
"D": "D",
|
||||
"E": "E",
|
||||
"F": "F",
|
||||
"G": "G",
|
||||
"H": "H"
|
||||
},
|
||||
|
||||
"chat": {
|
||||
"result": "Ergebnis",
|
||||
"success": "Geschafft",
|
||||
@ -165,18 +177,6 @@
|
||||
"waffenlos": "Waffenlos",
|
||||
"nahkampf": "Bewaffneter Nahkampf",
|
||||
"fernkampf": "Fernkampf"
|
||||
},
|
||||
|
||||
"steigern": {
|
||||
"A_Star": "A*",
|
||||
"A": "A",
|
||||
"B": "B",
|
||||
"C": "C",
|
||||
"D": "D",
|
||||
"E": "E",
|
||||
"F": "F",
|
||||
"G": "G",
|
||||
"H": "H"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
23
src/main.mjs
23
src/main.mjs
@ -291,6 +291,27 @@ class AttributeChoiceField extends StringField {
|
||||
}
|
||||
}
|
||||
|
||||
class SteigerungsKategorieField extends StringField {
|
||||
constructor(options={}, context={}) {
|
||||
return super({
|
||||
required: true,
|
||||
choices: {
|
||||
"A_Star": "DSA41.steigerungskategorie.A_Star",
|
||||
"A": "DSA41.steigerungskategorie.A",
|
||||
"B": "DSA41.steigerungskategorie.B",
|
||||
"C": "DSA41.steigerungskategorie.C",
|
||||
"D": "DSA41.steigerungskategorie.D",
|
||||
"E": "DSA41.steigerungskategorie.E",
|
||||
"F": "DSA41.steigerungskategorie.F",
|
||||
"G": "DSA41.steigerungskategorie.G",
|
||||
"H": "DSA41.steigerungskategorie.H",
|
||||
},
|
||||
initial: "A_Star",
|
||||
...options,
|
||||
}, context);
|
||||
}
|
||||
}
|
||||
|
||||
class DSA41_CharacterDocument extends Actor {
|
||||
static async create(data, operation) {
|
||||
const actor = await super.create(data, operation);
|
||||
@ -781,7 +802,7 @@ class DSA41_KampftalentData extends TypeDataModel {
|
||||
return {
|
||||
kategorie: new StringField({ initial: "waffenlos" }),
|
||||
behinderung: new StringField({ initial: "" }),
|
||||
steigern: new StringField({ initial: "A_Star"}),
|
||||
steigern: new SteigerungsKategorieField(),
|
||||
|
||||
beschreibung: new StringField({ initial: "" }),
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user