add display for Magische Sonderfertigkeiten
This commit is contained in:
parent
e4067d46a3
commit
e14506998f
@ -580,25 +580,25 @@
|
||||
</div>
|
||||
|
||||
<div class="list Sonderfertigkeiten">
|
||||
<div class="list-header">
|
||||
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_kampf")}}</div>
|
||||
</div>
|
||||
<div class="list-header">
|
||||
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_kampf")}}</div>
|
||||
</div>
|
||||
|
||||
{{#unless (ne actor.system.computed.num_kampf_sonderfertigkeiten 0)}}
|
||||
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||
{{/unless}}
|
||||
{{#unless (ne actor.system.computed.num_kampf_sonderfertigkeiten 0)}}
|
||||
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||
{{/unless}}
|
||||
|
||||
{{#each actor.itemTypes.Sonderfertigkeit}}
|
||||
{{#if (eq this.system.kategorie "kampf")}}
|
||||
<div class="list-item" data-item-id="{{_id}}">
|
||||
<div>
|
||||
<div class="fit-content" data-action="item-open" data-tooltip="{{this.system.beschreibung}}">{{maybeLocalize name prefix=(concat "DSA41.sonderfertigkeiten." system.kategorie ".name")}}</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="center fas fa-trash" data-action="item-delete"></div>
|
||||
{{#each actor.itemTypes.Sonderfertigkeit}}
|
||||
{{#if (eq this.system.kategorie "kampf")}}
|
||||
<div class="list-item" data-item-id="{{_id}}">
|
||||
<div>
|
||||
<div class="fit-content" data-action="item-open" data-tooltip="{{this.system.beschreibung}}">{{maybeLocalize name prefix=(concat "DSA41.sonderfertigkeiten." system.kategorie ".name")}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
<div></div>
|
||||
<div class="center fas fa-trash" data-action="item-delete"></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -637,6 +637,28 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
<div class="list Sonderfertigkeiten">
|
||||
<div class="list-header">
|
||||
<div>{{localize (concat "DSA41.sonderfertigkeiten.label_magisch")}}</div>
|
||||
</div>
|
||||
|
||||
{{#unless (ne actor.system.computed.num_magische_sonderfertigkeiten 0)}}
|
||||
<div class="list-item">{{localize "DSA41.list_empty"}}</div>
|
||||
{{/unless}}
|
||||
|
||||
{{#each actor.itemTypes.Sonderfertigkeit}}
|
||||
{{#if (eq this.system.kategorie "magisch")}}
|
||||
<div class="list-item" data-item-id="{{_id}}">
|
||||
<div>
|
||||
<div class="fit-content" data-action="item-open" data-tooltip="{{this.system.beschreibung}}">{{maybeLocalize name prefix=(concat "DSA41.sonderfertigkeiten." system.kategorie ".name")}}</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div class="center fas fa-trash" data-action="item-delete"></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -648,6 +648,10 @@ html {
|
||||
& > * {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
& .Sonderfertigkeiten {
|
||||
grid-template-columns: minmax(min-content, max-content) auto min-content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
10
src/main.mjs
10
src/main.mjs
@ -626,6 +626,7 @@ class DSA41_CharacterData extends TypeDataModel {
|
||||
num_nachteile: 0,
|
||||
num_allgemeine_sonderfertigkeiten: 0,
|
||||
num_kampf_sonderfertigkeiten: 0,
|
||||
num_magische_sonderfertigkeiten: 0,
|
||||
num_waffen: 0,
|
||||
num_fernkampf_waffen: 0,
|
||||
|
||||
@ -913,10 +914,11 @@ class DSA41_CharacterData extends TypeDataModel {
|
||||
handwerks: talente.filter((x) => x.system.kategorie === "handwerks"),
|
||||
};
|
||||
|
||||
this.computed.num_allgemeine_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "allgemein").length;
|
||||
this.computed.num_kampf_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "kampf").length;
|
||||
this.computed.num_vorteile = this.parent.items.filter((x) => x.type === "VorNachteil" && x.system.kategorie === "vorteil").length;
|
||||
this.computed.num_nachteile = this.parent.items.filter((x) => x.type === "VorNachteil" && x.system.kategorie === "nachteil").length;
|
||||
this.computed.num_allgemeine_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "allgemein").length;
|
||||
this.computed.num_kampf_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "kampf").length;
|
||||
this.computed.num_magische_sonderfertigkeiten = this.parent.items.filter((x) => x.type === "Sonderfertigkeit" && x.system.kategorie === "magisch").length;
|
||||
this.computed.num_vorteile = this.parent.items.filter((x) => x.type === "VorNachteil" && x.system.kategorie === "vorteil").length;
|
||||
this.computed.num_nachteile = this.parent.items.filter((x) => x.type === "VorNachteil" && x.system.kategorie === "nachteil").length;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user