mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Updated the longrest repair armor to the new armor max path along with a migration (#1777)
This commit is contained in:
parent
70e21f34db
commit
0d7469801e
3 changed files with 15 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { defaultRestOptions } from '../config/generalConfig.mjs';
|
||||
import { RefreshType, socketEvent } from './socket.mjs';
|
||||
|
||||
export async function runMigrations() {
|
||||
|
|
@ -341,6 +342,18 @@ export async function runMigrations() {
|
|||
|
||||
lastMigrationVersion = '2.0.0';
|
||||
}
|
||||
|
||||
if (foundry.utils.isNewerVersion('2.0.4', lastMigrationVersion)) {
|
||||
const downtimeMoves = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew);
|
||||
if (restMoves.longRest.moves.repairArmor) {
|
||||
await downtimeMoves.updateSource({
|
||||
'restMoves.longRest.moves.repairArmor': defaultRestOptions.longRest().repairArmor
|
||||
});
|
||||
game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew, downtimeMoves.toObject());
|
||||
}
|
||||
|
||||
lastMigrationVersion = '2.0.4';
|
||||
}
|
||||
//#endregion
|
||||
|
||||
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LastMigrationVersion, lastMigrationVersion);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue