fix : Prepare values are sometimes null, and default do nothing for it
This commit is contained in:
@@ -28,6 +28,14 @@ export default class HooksL5r5e {
|
|||||||
game.l5r5e.migrations.migrateWorld({ force: false }).then();
|
game.l5r5e.migrations.migrateWorld({ force: false }).then();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prepare values are sometimes null
|
||||||
|
["character", "adversary", "minion"].forEach(preparedId => {
|
||||||
|
const prepVal = game.settings.get(CONFIG.l5r5e.systemName, `initiative-prepared-${preparedId}`);
|
||||||
|
if (prepVal === null || prepVal === "null") {
|
||||||
|
game.settings.set(CONFIG.l5r5e.systemName, `initiative-prepared-${preparedId}`, "actor");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// For some reasons, not always really ready, so wait a little
|
// For some reasons, not always really ready, so wait a little
|
||||||
await new Promise((r) => setTimeout(r, 2000));
|
await new Promise((r) => setTimeout(r, 2000));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user