Migration draconic

Utilisation des noms de compétences draconiques standard
This commit is contained in:
Vincent Vandemeulebrouck 2024-12-04 00:24:59 +01:00
parent 28ee8607bb
commit bf0eea693a
5 changed files with 19 additions and 8 deletions

View File

@ -137,7 +137,7 @@ class _10_0_21_VehiculeStructureResistanceMax extends Migration {
}
class _10_0_33_MigrationNomsDraconic extends Migration {
get code() { return "competences-creature-parade"; }
get code() { return "competences-nom-draconic"; }
get version() { return "10.0.33"; }
migrationNomDraconic(ancien) {
@ -530,15 +530,25 @@ class _11_2_20_MigrationAstrologie extends Migration {
}
}
class _12_0_24_MigrationVoieSorts extends Migration {
class _12_0_26_MigrationVoieSorts extends Migration {
get code() { return "migration-voies-sorts" }
get version() { return "12.0.24" }
get version() { return "12.0.26" }
async migrate() {
await this.applyItemsUpdates(items => items
.filter(it => ITEM_TYPES.sort == it.type)
.filter(it => [ITEM_TYPES.sort, ITEM_TYPES.sortreserve].includes(it.type))
.map(it => this.migrateSort(it))
)
await this.applyItemsUpdates(items => items
.filter(it => ITEM_TYPES.competence == it.type && it.system.categorie == 'draconic')
.map(it => this.migrateDraconic(it))
)
}
migrateDraconic(it) {
return {
_id: it.id,
name: this.convertDraconic(it.name),
}
}
migrateSort(it) {
return {
@ -575,6 +585,7 @@ export class Migrations {
new _10_7_19_CategorieCompetenceCreature(),
new _10_7_19_PossessionsEntiteVictime(),
new _11_2_20_MigrationAstrologie(),
new _12_0_26_MigrationVoieSorts()
];
}

View File

@ -1,4 +1,4 @@
name: Voie d'Hypnos
name: Hypnos
type: competence
img: systems/foundryvtt-reve-de-dragon/icons/competence_hypnos.webp
_id: bt2cR4aE6lIOeg4F

View File

@ -1,4 +1,4 @@
name: Voie de Narcos
name: Narcos
type: competence
img: systems/foundryvtt-reve-de-dragon/icons/competence_narcos.webp
_id: u1Peok1EYkBcVsmN

View File

@ -1,4 +1,4 @@
name: Voie d'Oniros
name: Oniros
type: competence
img: systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp
_id: nnR2UHelUaF8dxYn

View File

@ -1,4 +1,4 @@
name: Voie de Thanatos
name: Thanatos
type: competence
img: systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp
_id: dPlTQzvU3CEg5qKc