Skip to content

Commit

Permalink
fix(config): Fix Rest settings
Browse files Browse the repository at this point in the history
fixes #470
  • Loading branch information
symposion committed Apr 12, 2017
1 parent 59ebadb commit 61a75ef
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/shaped-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,14 @@ const migrator = new Migrator()
.addProperty('config.newCharSettings.houserules.hitDiceRecoveredOnALongRest', '***default***')
.deleteProperty('config.newCharSettings.hide.hideSavingThrowSuccess')
.addProperty('config.newCharSettings.hide.hideTargetAC')
.deleteProperty('config.newCharSettings.display.showRests');
.deleteProperty('config.newCharSettings.display.showRests')
// 4.7 fix hit points /hit dice
.nextVersion()
.transformConfig((config) => {
const baseConfig = config.config.newCharSettings.houserules;
baseConfig.hitPointsRecoveredOnALongRest = baseConfig.hitPointsRecoveredOnALongRest || '0';
baseConfig.hitDiceRecoveredOnALongRest = baseConfig.hitDiceRecoveredOnALongRest || '0';
}, 'Fixing hit points/hit dice settings');

module.exports = class ShapedConfig extends ShapedModule {

Expand Down Expand Up @@ -844,12 +851,12 @@ module.exports = class ShapedConfig extends ShapedModule {
},
houserules: {
hitPointsRecoveredOnALongRest: this.getOptionList({
None: '',
None: '0',
Half: 'HALF',
All: '***default***',
}),
hitDiceRecoveredOnALongRest: this.getOptionList({
None: '',
None: '0',
Half: '***default***',
All: 'ALL',
}),
Expand Down

0 comments on commit 61a75ef

Please sign in to comment.