From 4832dd6f370e6d48ae9357747523747100c613d7 Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Wed, 23 Mar 2022 13:39:46 -0400 Subject: [PATCH 1/2] Allow regenerating random story using Retry button Commit b55e5a8e0b770d216339acf6346d18a3e7e8140c removed this feature, so this commit adds it back. --- aiserver.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aiserver.py b/aiserver.py index 21cbb719..3802c5c3 100644 --- a/aiserver.py +++ b/aiserver.py @@ -2862,6 +2862,9 @@ def actionretry(data): if(vars.noai): emit('from_server', {'cmd': 'errmsg', 'data': "Retry function unavailable in Read Only mode."}) return + if(vars.recentrng is not None): + randomGameRequest(vars.recentrng, memory=vars.recentrngm) + return if actionback(): actionsubmit("", actionmode=vars.actionmode, force_submit=True) send_debug() From 0348970b19a733fd15aed93a89004401eb2ba636 Mon Sep 17 00:00:00 2001 From: Gnome Ann <> Date: Wed, 23 Mar 2022 22:09:35 -0400 Subject: [PATCH 2/2] Make sure AI is not busy when using retry to regenerate random story --- aiserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index 3802c5c3..b5704e9d 100644 --- a/aiserver.py +++ b/aiserver.py @@ -2863,7 +2863,8 @@ def actionretry(data): emit('from_server', {'cmd': 'errmsg', 'data': "Retry function unavailable in Read Only mode."}) return if(vars.recentrng is not None): - randomGameRequest(vars.recentrng, memory=vars.recentrngm) + if(not vars.aibusy): + randomGameRequest(vars.recentrng, memory=vars.recentrngm) return if actionback(): actionsubmit("", actionmode=vars.actionmode, force_submit=True)