mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 10:29:54 +02:00
Finished animation framework
This commit is contained in:
parent
208e8192b4
commit
0961ad8d73
5 changed files with 129 additions and 97 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue