Repairs sheet to accomodate DataModel changes
Pull Request Check / testing (pull_request) Successful in 18s Details

pull/43/head
macniel 2025-09-29 14:51:46 +02:00
parent 403557b0f8
commit 2f45f6d4d6
3 changed files with 43 additions and 11 deletions

View File

@ -168,14 +168,46 @@ export class PlayerCharacterDataModel extends foundry.abstract.TypeDataModel {
await game.actors.getName(data.name).update({system: {talente}})
const startEigenschaften = {
"mu": 10,
"kl": 10,
"in": 10,
"ch": 10,
"ff": 10,
"ge": 10,
"ko": 10,
"kk": 10,
"mu": {
start: 10,
aktuell: 10,
mod: 0
},
"kl": {
start: 10,
aktuell: 10,
mod: 0
},
"in": {
start: 10,
aktuell: 10,
mod: 0
},
"ch": {
start: 10,
aktuell: 10,
mod: 0
},
"ff": {
start: 10,
aktuell: 10,
mod: 0
},
"ge": {
start: 10,
aktuell: 10,
mod: 0
},
"ko": {
start: 10,
aktuell: 10,
mod: 0
},
"kk": {
start: 10,
aktuell: 10,
mod: 0
}
}
await game.actors.getName(data.name).update({system: {attribute: startEigenschaften}})

View File

@ -130,7 +130,7 @@ export class CharacterSheet extends ActorSheet {
}
prepareEigenschaftRoll(actorData, name) {
return actorData.system.attribute[name.toLowerCase()]
return actorData.system.attribute[name.toLowerCase()].aktuell
}
async _onTalentRoll(event) {
@ -225,7 +225,7 @@ export class CharacterSheet extends ActorSheet {
activateListeners(html) {
super.activateListeners(html);
html.on('click', '.attribut.rollable', (evt) => {
html.on('click', '.attribute.rollable', (evt) => {
this._onAttributeRoll(evt);
});

View File

@ -1,4 +1,4 @@
<div class="attribute rollable" data-label="{{this.name}}" data-roll="1d20cs<=@{{this.eigenschaft}}">
<div class="attribute rollable" data-label="{{this.name}}" data-roll="1d20cs<=@{{this.eigenschaft}}.aktuell">
<div class="die">
{{> 'systems/DSA_4-1/templates/ui/partial-die.hbs' }}
</div>