Astrologie: garder toutes les lectures d'un acteur
This commit is contained in:
@ -5,6 +5,7 @@ import { Monnaie } from "./item-monnaie.js";
|
||||
import { RdDItem, TYPES } from "./item.js";
|
||||
import { RdDTimestamp } from "./time/rdd-timestamp.js";
|
||||
import { RdDRaretes } from "./item/raretes.js";
|
||||
import { RdDCalendrier } from "./time/rdd-calendrier.js";
|
||||
|
||||
class Migration {
|
||||
get code() { return "sample"; }
|
||||
@ -514,6 +515,20 @@ class _10_7_19_PossessionsEntiteVictime extends Migration {
|
||||
}
|
||||
}
|
||||
|
||||
class _11_2_20_MigrationAstrologie extends Migration {
|
||||
get code() { return "migration-astrologie" }
|
||||
get version() { return "11.2.20" }
|
||||
|
||||
async migrate() {
|
||||
const nombresAstraux = game.system.rdd.calendrier.getNombresAstraux()
|
||||
nombresAstraux.forEach(na => {
|
||||
na.lectures = na.valeursFausses
|
||||
na.valeursFausses = undefined
|
||||
})
|
||||
await game.system.rdd.calendrier.setNombresAstraux(nombresAstraux)
|
||||
}
|
||||
}
|
||||
|
||||
export class Migrations {
|
||||
static getMigrations() {
|
||||
return [
|
||||
@ -532,6 +547,7 @@ export class Migrations {
|
||||
new _10_7_0_MigrationBlessures(),
|
||||
new _10_7_19_CategorieCompetenceCreature(),
|
||||
new _10_7_19_PossessionsEntiteVictime(),
|
||||
new _11_2_20_MigrationAstrologie(),
|
||||
];
|
||||
}
|
||||
|
||||
@ -546,7 +562,10 @@ export class Migrations {
|
||||
}
|
||||
|
||||
migrate() {
|
||||
const currentVersion = game.settings.get(SYSTEM_RDD, "systemMigrationVersion");
|
||||
let currentVersion = game.settings.get(SYSTEM_RDD, "systemMigrationVersion")
|
||||
if (currentVersion.startsWith("v")) {
|
||||
currentVersion = currentVersion.substring(1)
|
||||
}
|
||||
if (isNewerVersion(game.system.version, currentVersion)) {
|
||||
// if (true) { /* comment previous and uncomment here to test before upgrade */
|
||||
const migrations = Migrations.getMigrations().filter(m => isNewerVersion(m.version, currentVersion));
|
||||
|
Reference in New Issue
Block a user