Merge pull request #1619 from LenAnderson/worldinfo_updated-event
Add event when world info is updated
This commit is contained in:
commit
52637ccd39
|
@ -323,6 +323,7 @@ export const event_types = {
|
|||
OAI_PRESET_CHANGED_BEFORE: 'oai_preset_changed_before',
|
||||
OAI_PRESET_CHANGED_AFTER: 'oai_preset_changed_after',
|
||||
WORLDINFO_SETTINGS_UPDATED: 'worldinfo_settings_updated',
|
||||
WORLDINFO_UPDATED: 'worldinfo_updated',
|
||||
CHARACTER_EDITED: 'character_edited',
|
||||
CHARACTER_PAGE_LOADED: 'character_page_loaded',
|
||||
CHARACTER_GROUP_OVERLAY_STATE_CHANGE_BEFORE: 'character_group_overlay_state_change_before',
|
||||
|
|
|
@ -1420,6 +1420,7 @@ async function _save(name, data) {
|
|||
headers: getRequestHeaders(),
|
||||
body: JSON.stringify({ name: name, data: data }),
|
||||
});
|
||||
eventSource.emit(event_types.WORLDINFO_UPDATED, name, data);
|
||||
}
|
||||
|
||||
async function saveWorldInfo(name, data, immediately) {
|
||||
|
|
Loading…
Reference in New Issue