mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +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
|
|
@ -484,7 +484,7 @@ export const defaultRestOptions = {
|
|||
value: {
|
||||
custom: {
|
||||
enabled: true,
|
||||
formula: '@system.armorScore'
|
||||
formula: '@system.armorScore.max'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"id": "daggerheart",
|
||||
"title": "Daggerheart",
|
||||
"description": "An unofficial implementation of the Daggerheart system",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"compatibility": {
|
||||
"minimum": "14.359",
|
||||
"verified": "14.359",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue