Allow extensions to add or exclude WI entries (#4304) * Allows control of Lore books entries by extensions * WORLDINFO_SORTING changed to WORLDINFO_ENTRIES_LOADED --------- Co-authored-by: zonde306 <anonymous@localhost>

90adf2f10461b0ce17df534555eb58bf50788a88

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
2 files changed, +3 -0Ignore whitespace
public/scripts/events.js+1 -0
@@ -86,6 +86,7 @@ export const event_types = {
8686 PRESET_CHANGED: 'preset_changed',
8787 PRESET_DELETED: 'preset_deleted',
8888 MAIN_API_CHANGED: 'main_api_changed',
89+ WORLDINFO_ENTRIES_LOADED: 'worldinfo_entries_loaded',
8990};
9091
9192export const eventSource = new EventEmitter([event_types.APP_READY]);
public/scripts/world-info.js+2 -0
@@ -4107,6 +4107,8 @@ export async function getSortedEntries() {
41074107 getPersonaLore(),
41084108 ]);
41094109
4110+ await eventSource.emit(event_types.WORLDINFO_ENTRIES_LOADED, { globalLore, characterLore, chatLore, personaLore });
4111+
41104112 let entries;
41114113
41124114 switch (Number(world_info_character_strategy)) {