Fix the behaviour of the `softprompt` setting

This commit is contained in:
Gnome Ann 2021-12-23 16:14:09 -05:00
parent 4a852d7f95
commit c305076cf3
1 changed files with 3 additions and 3 deletions

View File

@ -1977,7 +1977,7 @@ def loadsettings():
vars.corescript = "default.lua" vars.corescript = "default.lua"
if(vars.allowsp and "softprompt" in js and type(js["softprompt"]) is str and all(q not in js["softprompt"] for q in ("..", ":")) and all(js["softprompt"][0] not in q for q in ("/", "\\"))): if(vars.allowsp and "softprompt" in js and type(js["softprompt"]) is str and all(q not in js["softprompt"] for q in ("..", ":")) and all(js["softprompt"][0] not in q for q in ("/", "\\"))):
spRequest(vars.spfilename) spRequest(js["softprompt"])
else: else:
vars.spfilename = "" vars.spfilename = ""
@ -3734,7 +3734,7 @@ def loadRequest(loadpath, filename=None):
#==================================================================# #==================================================================#
def spRequest(filename): def spRequest(filename):
vars.spfilename = "" vars.spfilename = ""
savesettings() settingschanged()
if(len(filename) == 0): if(len(filename) == 0):
vars.sp = None vars.sp = None
@ -3780,7 +3780,7 @@ def spRequest(filename):
vars.sp = torch.from_numpy(tensor) vars.sp = torch.from_numpy(tensor)
vars.spfilename = filename vars.spfilename = filename
savesettings() settingschanged()
#==================================================================# #==================================================================#
# Import an AIDungon game exported with Mimi's tool # Import an AIDungon game exported with Mimi's tool