This commit is contained in:
WBHarry 2026-04-04 13:01:24 +02:00 committed by GitHub
parent 331f1ebf75
commit 7057504a9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 46 additions and 16 deletions

View file

@ -43,9 +43,10 @@ export default class DualityDie extends foundry.dice.terms.Die {
options: { appearance: {} }
};
const preset = await getDiceSoNicePreset(diceSoNice[key], faces);
diceSoNiceRoll.dice[0].options.appearance = preset.appearance;
diceSoNiceRoll.dice[0].options.modelFile = preset.modelFile;
const diceAppearance = await this.getDiceSoNiceAppearance(options.liveRoll.roll);
diceSoNiceRoll.dice[0].options.appearance = diceAppearance.appearance;
diceSoNiceRoll.dice[0].options.modelFile = diceAppearance.modelFile;
diceSoNiceRoll.dice[0].results = diceSoNiceRoll.dice[0].results.filter(x => x.active);
await game.dice3d.showForRoll(diceSoNiceRoll, game.user, true);
} else {
@ -59,4 +60,11 @@ export default class DualityDie extends foundry.dice.terms.Die {
this.#updateResources(oldDuality, newDuality, options.liveRoll.actor);
}
}
/**
* Overridden by extending classes HopeDie and FearDie
*/
async getDiceSoNiceAppearance() {
return {};
}
}