File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,7 @@ export function registerNegativeHp() {
443443export async function rerollInitiative ( combat , data , options ) {
444444 let mode = getSetting ( CONSTANTS . INITIATIVE . SETTING . REROLL_INITIATIVE_EACH_ROUND . KEY ) ;
445445 if ( mode === true ) mode = "rerollAll" ;
446+ if ( mode === false || mode === "false" ) mode = "off" ;
446447 if ( ! mode || mode === "off" || data . turn !== 0 ) return ;
447448
448449 await combat . resetAll ( ) ;
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ export function migrate() {
4444 isSuccess = ( ! migrationVersion || foundry . utils . isNewerVersion ( "2.2.4" , migrationVersion ) ) ? migrateConditions ( ) : true ;
4545 isSuccess = ( ! migrationVersion || foundry . utils . isNewerVersion ( "2.3.0" , migrationVersion ) ) ? migrateAwardInspirationRollType ( ) : true ;
4646 isSuccess = ( ! migrationVersion || foundry . utils . isNewerVersion ( "3.0.0" , migrationVersion ) ) ? migrateRerollInitiative ( ) : true ;
47+ isSuccess = ( ! migrationVersion || foundry . utils . isNewerVersion ( "3.2.2" , migrationVersion ) ) ? migrateRerollInitiative ( ) : true ;
4748
4849 if ( isSuccess ) {
4950 setSetting ( constants . VERSION . SETTING . KEY , moduleVersion ) ;
@@ -120,9 +121,9 @@ export async function migrateAwardInspirationRollType() {
120121export async function migrateRerollInitiative ( ) {
121122 try {
122123 const value = getSetting ( CONSTANTS . INITIATIVE . SETTING . REROLL_INITIATIVE_EACH_ROUND . KEY ) ;
123- if ( value === true ) {
124+ if ( value === true || value === "true" ) {
124125 await setSetting ( CONSTANTS . INITIATIVE . SETTING . REROLL_INITIATIVE_EACH_ROUND . KEY , "rerollAll" ) ;
125- } else if ( value === false || ! value ) {
126+ } else if ( value === false || value === "false" || ! value ) {
126127 await setSetting ( CONSTANTS . INITIATIVE . SETTING . REROLL_INITIATIVE_EACH_ROUND . KEY , "off" ) ;
127128 }
128129 return true ;
You can’t perform that action at this time.
0 commit comments