Skip to content

Commit 4e17fd3

Browse files
committed
Move initializing notifications
1 parent 6de2d67 commit 4e17fd3

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/ts/effects/effect-definition.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ abstract class EffectDefinition {
1616

1717
async initialize(): Promise<void> {
1818
if (BUILD_MODE === "development" || !this.settings.hasInitialized) {
19+
ui.notifications.info(
20+
game.i18n.localize("ConvenientEffects.Initializing"),
21+
);
1922
await this.#createItemsAndEffects({ backup: false });
2023
await this.#createItemsAndEffects({ backup: true });
2124

2225
// Set initialized before migration runs
2326
await this.settings.setHasInitialized(true);
27+
ui.notifications.info(
28+
game.i18n.localize("ConvenientEffects.FinishedInitializing"),
29+
);
2430
}
2531

2632
await this.#runMigrations();

src/ts/hooks/createEffects.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ const CreateEffects: Listener = {
2020
const systemDefinition = mapping.findSystemDefinitionForSystemId();
2121

2222
try {
23-
ui.notifications.info(`Initializing convenient effects...`);
2423
await systemDefinition?.effectDefinition?.initialize();
25-
ui.notifications.info(
26-
`Finished initializing convenient effects`,
27-
);
2824
} catch (e: any) {
2925
ui.notifications.error(
3026
`Something went wrong while initializing convenient effects`,

static/lang/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"ConfigOtherEffectsLabel": "Other Effects",
7070
"ConfigOtherEffectsHint": "The other effects that will be applied in relation to this effect. If this effect is removed, the other effects will not be automatically removed.",
7171

72+
"Initializing": "Initializing convenient effects...",
73+
"FinishedInitializing": "Finished initializing convenient effects",
74+
7275
"Dnd": {
7376
"Folders": {
7477
"Conditions": "Conditions",

0 commit comments

Comments
 (0)