[Feature] Countdown Rols And Randomzie (#1329)

* .

* .

* .

* Raised system version
This commit is contained in:
WBHarry 2025-11-25 00:36:43 +01:00 committed by GitHub
parent 9e0bc3cff1
commit d137e33c3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 281 additions and 87 deletions

View file

@ -8,7 +8,10 @@ export default class DhCountdownAction extends DHBaseAction {
...super.defaultValues,
countdown: {
name: this.parent.parent.name,
img: this.img
img: this.img,
progress: {
startFormula: '1'
}
}
};
}
@ -21,10 +24,26 @@ export default class DhCountdownAction extends DHBaseAction {
{
...game.system.api.data.countdowns.DhCountdown.defaultCountdown(),
name: parent.parent.name,
img: parent.parent.img
img: parent.parent.img,
progress: {
startFormula: '1'
}
}
];
return updateSource;
}
/** @inheritDoc */
static migrateData(source) {
for (const countdown of source.countdown) {
if (countdown.progress.max) {
countdown.progress.startFormula = countdown.progress.max;
countdown.progress.start = 1;
countdown.progress.max = null;
}
}
return super.migrateData(source);
}
}