asacolips-projects / pbta

Run games for any PbtA system in Foundry VTT!
https://asacolips.gitbook.io/pbta-system
MIT License
3 stars 7 forks source link

fix: utils.getPlaybooks is called before Babele is ready - [merged] #179

Closed asacolips closed 7 months ago

asacolips commented 7 months ago

In GitLab by @DjLeChuck on Mar 14, 2024, 07:29

Merges fix-playbooks-with-babele -> master

utils.getPlaybooks is called during the ready hook.

As he load data from compendiums, it’s not working well when using Babele because Babele is not ready yet, so translations are not loaded.

With this fix, if Babele is present we use it’s babele.ready hook, but if he’s not, nothing change.

asacolips commented 7 months ago

In GitLab by @mclemente on Mar 14, 2024, 13:06

Commented on src/module/pbta.js line 238

Change this to if (game.modules.get("babele")?.active) {, otherwise it will break worlds where the module is installed but not active.

asacolips commented 7 months ago

In GitLab by @DjLeChuck on Mar 14, 2024, 13:11

Commented on src/module/pbta.js line 238

Woops you’re right!

asacolips commented 7 months ago

In GitLab by @DjLeChuck on Mar 14, 2024, 13:12

Commented on src/module/pbta.js line 238

changed this line in version 2 of the diff

asacolips commented 7 months ago

In GitLab by @DjLeChuck on Mar 14, 2024, 13:12

added 1 commit

Compare with previous version

asacolips commented 7 months ago

In GitLab by @DjLeChuck on Mar 14, 2024, 13:13

resolved all threads

asacolips commented 7 months ago

In GitLab by @Asacolips on Mar 15, 2024, 11:13

approved this merge request

asacolips commented 7 months ago

In GitLab by @Asacolips on Mar 16, 2024, 12:37

mentioned in commit 65ab4919cb18f513bf54aa94d99bb200bb363751