requires retargeting of styling
parent
561e34d0ff
commit
96d7b18742
|
|
@ -21,7 +21,7 @@ export default {
|
||||||
icon: e.icon,
|
icon: e.icon,
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
return returnValue;
|
return returnValue
|
||||||
}
|
}
|
||||||
|
|
||||||
context.mods = {
|
context.mods = {
|
||||||
|
|
@ -36,8 +36,8 @@ export default {
|
||||||
"at": await getModsOfAttribute('system.at.mod', actorData),
|
"at": await getModsOfAttribute('system.at.mod', actorData),
|
||||||
"pa": await getModsOfAttribute('system.pa.mod', actorData),
|
"pa": await getModsOfAttribute('system.pa.mod', actorData),
|
||||||
"fk": await getModsOfAttribute('system.fk.mod', actorData),
|
"fk": await getModsOfAttribute('system.fk.mod', actorData),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context.attributes = [
|
context.attributes = [
|
||||||
{
|
{
|
||||||
eigenschaft: "mu",
|
eigenschaft: "mu",
|
||||||
|
|
@ -87,7 +87,6 @@ export default {
|
||||||
tooltip: "Körperkraft",
|
tooltip: "Körperkraft",
|
||||||
wert: context.derived.attribute.kk.aktuell ?? 0,
|
wert: context.derived.attribute.kk.aktuell ?? 0,
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
Object.values(actorData.items).forEach((item) => {
|
Object.values(actorData.items).forEach((item) => {
|
||||||
|
|
@ -101,12 +100,12 @@ export default {
|
||||||
isAdvantage: !item.system.nachteil,
|
isAdvantage: !item.system.nachteil,
|
||||||
isDisadvantage: item.system.nachteil,
|
isDisadvantage: item.system.nachteil,
|
||||||
isBadAttribute: item.system.schlechteEigenschaft
|
isBadAttribute: item.system.schlechteEigenschaft
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
context.specialAbilities = [];
|
context.specialAbilities = []
|
||||||
Object.values(actorData.items).forEach((item) => {
|
Object.values(actorData.items).forEach((item) => {
|
||||||
if (item.type === "SpecialAbility") {
|
if (item.type === "SpecialAbility") {
|
||||||
context.specialAbilities.push({
|
context.specialAbilities.push({
|
||||||
|
|
@ -116,6 +115,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,8 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return context
|
||||||
|
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,8 @@ export default {
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options, element) => {
|
_onRender: (context, options, element) => {
|
||||||
const mapAllSets = () => {
|
const mapAllSets = () => {
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ export default {
|
||||||
})
|
})
|
||||||
|
|
||||||
context.hasLiturgies = context.blessings.length > 0;
|
context.hasLiturgies = context.blessings.length > 0;
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ export default {
|
||||||
context.originalName = actorData.name
|
context.originalName = actorData.name
|
||||||
context.name = context.derived.name ?? actorData.name
|
context.name = context.derived.name ?? actorData.name
|
||||||
context.effects = actorData.effects ?? []
|
context.effects = actorData.effects ?? []
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,9 @@ export default {
|
||||||
context.flatSkills.push(obj);
|
context.flatSkills.push(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
context.hasSpells = context.spells.length > 0;
|
context.hasSpells = context.spells.length > 0
|
||||||
|
|
||||||
|
return context
|
||||||
},
|
},
|
||||||
_onRender: (context, options) => {
|
_onRender: (context, options) => {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,13 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
sheet: {
|
sheet: {
|
||||||
tabs: [
|
tabs: [
|
||||||
{id: 'meta', group: 'sheet', label: 'Meta'},
|
{id: 'meta', group: 'sheet', label: 'Meta'},
|
||||||
|
{id: 'attributes', group: 'sheet', label: 'Eigenschaften'},
|
||||||
|
{id: 'combat', group: 'sheet', label: 'Kampf'},
|
||||||
|
{id: 'equipment', group: 'sheet', label: 'Inventar'},
|
||||||
|
{id: 'skills', group: 'sheet', label: 'Talente'},
|
||||||
|
{id: 'spells', group: 'sheet', label: 'Zauber'},
|
||||||
|
{id: 'liturgies', group: 'sheet', label: 'Liturgien'},
|
||||||
|
|
||||||
],
|
],
|
||||||
initial: 'meta'
|
initial: 'meta'
|
||||||
}
|
}
|
||||||
|
|
@ -103,20 +110,41 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
await this.document.update(formData.object) // Note: formData.object
|
await this.document.update(formData.object) // Note: formData.object
|
||||||
}
|
}
|
||||||
|
|
||||||
_getTabsConfig(group) {
|
/*
|
||||||
const tabs = foundry.utils.deepClone(super._getTabsConfig(group))
|
_getTabsConfig(group) {
|
||||||
Attributes._getTabConfig(tabs)
|
const tabs = foundry.utils.deepClone(super._getTabsConfig(group))
|
||||||
Combat._getTabConfig(tabs)
|
Attributes._getTabConfig(tabs)
|
||||||
Equipment._getTabConfig(tabs)
|
Combat._getTabConfig(tabs)
|
||||||
Skills._getTabConfig(tabs)
|
Equipment._getTabConfig(tabs)
|
||||||
Spells._getTabConfig(tabs)
|
Skills._getTabConfig(tabs)
|
||||||
Liturgies._getTabConfig(tabs)
|
Spells._getTabConfig(tabs)
|
||||||
Effects._getTabConfig(tabs)
|
Liturgies._getTabConfig(tabs)
|
||||||
return tabs
|
Effects._getTabConfig(tabs)
|
||||||
}
|
return tabs
|
||||||
|
}
|
||||||
|
*/
|
||||||
async _preparePartContext(partId, context) {
|
async _preparePartContext(partId, context) {
|
||||||
switch (partId) {
|
switch (partId) {
|
||||||
|
case "form":
|
||||||
|
const actorData = context.document
|
||||||
|
context.system = actorData.system
|
||||||
|
context.flags = actorData.flags
|
||||||
|
context.derived = context.document.system
|
||||||
|
context.originalName = actorData.name
|
||||||
|
context.name = context.derived.name ?? actorData.name
|
||||||
|
context.effects = actorData.effects ?? []
|
||||||
|
|
||||||
|
context.maxWounds = actorData.system.wunden.max ?? 3
|
||||||
|
context.wounds = actorData.system.wunden.aktuell ?? 0
|
||||||
|
context.woundsFilled = []
|
||||||
|
for (let i = 1; i <= context.maxWounds; i++) {
|
||||||
|
context.woundsFilled[i] = i <= context.wounds
|
||||||
|
}
|
||||||
|
|
||||||
|
context.zonenruestung = game.settings.get("DSA_4-1", "optional_ruestungzonen")
|
||||||
|
context.trefferzonen = game.settings.get("DSA_4-1", "optional_trefferzonen")
|
||||||
|
context.ausdauer = game.settings.get("DSA_4-1", "optional_ausdauer")
|
||||||
|
break;
|
||||||
case "meta":
|
case "meta":
|
||||||
Meta._prepareContext(context, this.object)
|
Meta._prepareContext(context, this.object)
|
||||||
break
|
break
|
||||||
|
|
@ -142,31 +170,7 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) {
|
||||||
Effects._prepareContext(context, this.object)
|
Effects._prepareContext(context, this.object)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
return context
|
||||||
|
|
||||||
/** @override */
|
|
||||||
async _prepareContext(options) {
|
|
||||||
const context = await super._prepareContext(options)
|
|
||||||
const actorData = context.document
|
|
||||||
context.system = actorData.system
|
|
||||||
context.flags = actorData.flags
|
|
||||||
context.derived = context.document.system
|
|
||||||
context.originalName = actorData.name
|
|
||||||
context.name = context.derived.name ?? actorData.name
|
|
||||||
context.effects = actorData.effects ?? []
|
|
||||||
|
|
||||||
context.maxWounds = actorData.system.wunden.max ?? 3
|
|
||||||
context.wounds = actorData.system.wunden.aktuell ?? 0
|
|
||||||
context.woundsFilled = []
|
|
||||||
for (let i = 1; i <= context.maxWounds; i++) {
|
|
||||||
context.woundsFilled[i] = i <= context.wounds
|
|
||||||
}
|
|
||||||
|
|
||||||
context.zonenruestung = game.settings.get("DSA_4-1", "optional_ruestungzonen")
|
|
||||||
context.trefferzonen = game.settings.get("DSA_4-1", "optional_trefferzonen")
|
|
||||||
context.ausdauer = game.settings.get("DSA_4-1", "optional_ausdauer")
|
|
||||||
|
|
||||||
return context;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onRender(context, options) {
|
_onRender(context, options) {
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,7 @@
|
||||||
@use "../atoms/colours" as colour;
|
@use "../atoms/colours" as colour;
|
||||||
|
|
||||||
|
|
||||||
.dsa41.sheet.actor.character {
|
.application.sheet.dsa41.actor.character {
|
||||||
|
|
||||||
.window-header.flexrow.draggable.resizable {
|
|
||||||
}
|
|
||||||
|
|
||||||
$sidebar-width: 224px;
|
$sidebar-width: 224px;
|
||||||
$attribute-height: 60px;
|
$attribute-height: 60px;
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,5 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
Loading…
Reference in New Issue