Finished animation framework

This commit is contained in:
WBHarry 2026-06-10 14:51:44 +02:00
parent 208e8192b4
commit 0961ad8d73
5 changed files with 129 additions and 97 deletions

View file

@ -16,16 +16,16 @@ export default class DhCountdowns extends foundry.abstract.DataModel {
handleChange() {
const previousCountdowns = foundry.ui.countdowns.previusCountdownData;
const changedCountdowns = Object.values(this.countdowns).reduce((acc, [key, countdown]) => {
const changedCountdowns = Object.entries(this.countdowns).reduce((acc, [key, countdown]) => {
const previousCountdown = previousCountdowns[key];
if (!previousCountdown || (previousCountdown.current !== countdown.current)) {
if (!previousCountdown || (previousCountdown.progress.current !== countdown.progress.current)) {
acc.push(key);
}
return acc;
}, []);
foundry.ui.performChangeAnimations(changedCountdowns);
foundry.ui.countdowns.changedCountdownsForAnimation.add(...changedCountdowns);
}
migrateData(source) {