Fixes an import from compendium error, as the imported document does not yet have any statistics when it has been dropped
Pull Request Check / testing (pull_request) Successful in 18s
Details
Pull Request Check / testing (pull_request) Successful in 18s
Details
parent
b781a1935b
commit
ca847ac135
|
|
@ -158,8 +158,9 @@ export class CharacterSheet extends ActorSheet {
|
||||||
Object.values(actorData.items).forEach((item, index) => {
|
Object.values(actorData.items).forEach((item, index) => {
|
||||||
if (item.type === "ActiveEffect") {
|
if (item.type === "ActiveEffect") {
|
||||||
const effect = item.effects[0];
|
const effect = item.effects[0];
|
||||||
console.log(effect.changes);
|
|
||||||
const conditions = []
|
const conditions = []
|
||||||
|
|
||||||
|
if (effect) {
|
||||||
effect.changes.forEach(change => {
|
effect.changes.forEach(change => {
|
||||||
if (change.key.indexOf("wunden") === -1) {
|
if (change.key.indexOf("wunden") === -1) {
|
||||||
const key = change.key
|
const key = change.key
|
||||||
|
|
@ -174,6 +175,7 @@ export class CharacterSheet extends ActorSheet {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
context.effects.push({
|
context.effects.push({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
|
|
|
||||||
|
|
@ -781,6 +781,12 @@
|
||||||
|
|
||||||
<div class="tab effects" data-group="primary" data-tab="effects">
|
<div class="tab effects" data-group="primary" data-tab="effects">
|
||||||
<table class="effects">
|
<table class="effects">
|
||||||
|
<thead>
|
||||||
|
<th>Effekt</th>
|
||||||
|
<th>Veränderungen</th>
|
||||||
|
<th></th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{{#each this.effects}}
|
{{#each this.effects}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -792,6 +798,7 @@
|
||||||
class="fa-solid fa-trash"></i></button>{{/if}}</td>
|
class="fa-solid fa-trash"></i></button>{{/if}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue