Ajout Résistance/structure max aux véhicules
Pour qu'on puisse les réparer
This commit is contained in:
@ -80,11 +80,30 @@ class _10_0_17_MigrationCompetenceCreature extends Migration {
|
||||
}
|
||||
}
|
||||
|
||||
class _10_0_21_VehiculeStructureResistanceMax extends Migration {
|
||||
get code() { return "vehicule-structure-resistance-max"; }
|
||||
get version() { return "10.0.21"; }
|
||||
|
||||
async migrate() {
|
||||
await game.actors
|
||||
.filter((actor) => actor.type == "vehicule")
|
||||
.forEach(async (actor) => {
|
||||
await actor.update({
|
||||
'system.etat.resistance.value': actor.system.resistance,
|
||||
'system.etat.resistance.max': actor.system.resistance,
|
||||
'system.etat.structure.value': actor.system.structure,
|
||||
'system.etat.structure.max': actor.system.structure
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class Migrations {
|
||||
static getMigrations() {
|
||||
return [
|
||||
new _10_0_16_MigrationSortsReserve(),
|
||||
new _10_0_17_MigrationCompetenceCreature()
|
||||
new _10_0_17_MigrationCompetenceCreature(),
|
||||
new _10_0_21_VehiculeStructureResistanceMax(),
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user