From fab0913270e79cfac3f1e7f4eab781101eaa5faf Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Fri, 21 Jan 2022 16:39:51 -0500 Subject: [PATCH] Call `setgamesaved(False)` in `update_story_chunk` and `remove_story_chunk` --- aiserver.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index 0d32a014..b963a510 100644 --- a/aiserver.py +++ b/aiserver.py @@ -3228,6 +3228,7 @@ def update_story_chunk(idx: Union[int, str]): # prompt might not have been shown yet (with a "Generating story..." # message instead). refresh_story() + setgamesaved(False) return idx = (vars.actions.get_last_key() if len(vars.actions) else 0) + 1 @@ -3245,7 +3246,9 @@ def update_story_chunk(idx: Union[int, str]): chunk_text = f'{formatforhtml(item)}' emit('from_server', {'cmd': 'updatechunk', 'data': {'index': idx, 'html': chunk_text}}, broadcast=True) - + + setgamesaved(False) + #If we've set the auto save flag, we'll now save the file if vars.autosave and (".json" in vars.savedir): save() @@ -3256,6 +3259,7 @@ def update_story_chunk(idx: Union[int, str]): #==================================================================# def remove_story_chunk(idx: int): emit('from_server', {'cmd': 'removechunk', 'data': idx}, broadcast=True) + setgamesaved(False) #==================================================================#