From 93837943c41eac2758e9a05f5c0f960d2faf8f5a Mon Sep 17 00:00:00 2001 From: dazedanon Date: Sat, 5 Apr 2025 18:56:18 -0500 Subject: [PATCH] Major fix to actors scan --- modules/rpgmakermvmz.py | 47 +++++++++++++++++++++++++++++++++++++---- vocab.txt | 4 ++-- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index b6e1e55..465bec8 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -534,6 +534,7 @@ def searchNames(data, pbar, context): with open("translations.txt", "a", encoding="utf-8") as file: file.write(f"\n#{context}\n") while i < len(data) or filling == True: + batchFull = False if i < len(data): # Empty Data if data[i] is None or data[i]["name"] == "": @@ -548,7 +549,7 @@ def searchNames(data, pbar, context): nameList.append(data[i]["name"]) if "nickname" in data[i] and data[i]["nickname"]: nicknameList.append(data[i]["nickname"]) - if "profile" in data[i] and data[i]["profile"] != "": + if "profile" in data[i] and data[i]["profile"]: profileList.append(data[i]["profile"].replace("\n", " ")) # Notes @@ -744,6 +745,8 @@ def searchNames(data, pbar, context): # If Batch is empty. Move on. if len(translatedNameBatch) == 0: nameList.clear() + profileList.clear() + nicknameList.clear() filling = False j += 1 else: @@ -1552,7 +1555,7 @@ def searchCodes(page, pbar, jobList, filename): else: # Grab and Replace translatedText = list355655[0] - translatedText = translatedText.replace("'", "\\'") + translatedText = re.sub(r"(?