Prevent retry from popping chunks after edit/delete
This commit is contained in:
parent
231290608d
commit
97e1760af5
|
@ -937,6 +937,7 @@ def actionsubmit(data, actionmode=0):
|
||||||
set_aibusy(1)
|
set_aibusy(1)
|
||||||
|
|
||||||
vars.recentback = False
|
vars.recentback = False
|
||||||
|
vars.recentedit = False
|
||||||
vars.actionmode = actionmode
|
vars.actionmode = actionmode
|
||||||
|
|
||||||
# "Action" mode
|
# "Action" mode
|
||||||
|
@ -993,13 +994,14 @@ def actionretry(data):
|
||||||
# Remove last action if possible and resubmit
|
# Remove last action if possible and resubmit
|
||||||
if(vars.gamestarted if vars.useprompt else len(vars.actions) > 0):
|
if(vars.gamestarted if vars.useprompt else len(vars.actions) > 0):
|
||||||
set_aibusy(1)
|
set_aibusy(1)
|
||||||
if(not vars.recentback and len(vars.actions) != 0 and len(vars.genseqs) == 0): # Don't pop if we're in the "Select sequence to keep" menu or if there are no non-prompt actions
|
if(not vars.recentback and not vars.recentedit and len(vars.actions) != 0 and len(vars.genseqs) == 0): # Don't pop if we're in the "Select sequence to keep" menu or if there are no non-prompt actions
|
||||||
last_key = vars.actions.get_last_key()
|
last_key = vars.actions.get_last_key()
|
||||||
vars.actions.pop()
|
vars.actions.pop()
|
||||||
remove_story_chunk(last_key + 1)
|
remove_story_chunk(last_key + 1)
|
||||||
vars.genseqs = []
|
vars.genseqs = []
|
||||||
calcsubmit('')
|
calcsubmit('')
|
||||||
vars.recentback = False
|
vars.recentback = False
|
||||||
|
vars.recentedit = False
|
||||||
elif(not vars.useprompt):
|
elif(not vars.useprompt):
|
||||||
emit('from_server', {'cmd': 'errmsg', 'data': "Please enable \"Always Add Prompt\" to retry with your prompt."})
|
emit('from_server', {'cmd': 'errmsg', 'data': "Please enable \"Always Add Prompt\" to retry with your prompt."})
|
||||||
|
|
||||||
|
@ -1548,6 +1550,7 @@ def editrequest(n):
|
||||||
#
|
#
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
def editsubmit(data):
|
def editsubmit(data):
|
||||||
|
vars.recentedit = True
|
||||||
if(vars.editln == 0):
|
if(vars.editln == 0):
|
||||||
vars.prompt = data
|
vars.prompt = data
|
||||||
else:
|
else:
|
||||||
|
@ -1576,6 +1579,7 @@ def deleterequest():
|
||||||
#
|
#
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
def inlineedit(chunk, data):
|
def inlineedit(chunk, data):
|
||||||
|
vars.recentedit = True
|
||||||
chunk = int(chunk)
|
chunk = int(chunk)
|
||||||
if(chunk == 0):
|
if(chunk == 0):
|
||||||
if(len(data.strip()) == 0):
|
if(len(data.strip()) == 0):
|
||||||
|
@ -1592,6 +1596,7 @@ def inlineedit(chunk, data):
|
||||||
#
|
#
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
def inlinedelete(chunk):
|
def inlinedelete(chunk):
|
||||||
|
vars.recentedit = True
|
||||||
chunk = int(chunk)
|
chunk = int(chunk)
|
||||||
# Don't delete prompt
|
# Don't delete prompt
|
||||||
if(chunk == 0):
|
if(chunk == 0):
|
||||||
|
|
Loading…
Reference in New Issue