mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Pokémon R/B: Another quiz fix
This commit is contained in:
@@ -118,9 +118,9 @@ def encode_text(text: str, length: int=0, whitespace=False, force=False, safety=
|
||||
special = False
|
||||
for char in text:
|
||||
if char == ">":
|
||||
if spec_char in unsafe_chars and safety:
|
||||
raise KeyError(f"Disallowed Pokemon text special character '<{spec_char}>'")
|
||||
try:
|
||||
if spec_char in unsafe_chars and safety:
|
||||
raise KeyError(f"Disallowed Pokemon text special character '<{spec_char}>'")
|
||||
encoded_text.append(special_chars[spec_char])
|
||||
except KeyError:
|
||||
if force:
|
||||
@@ -135,10 +135,10 @@ def encode_text(text: str, length: int=0, whitespace=False, force=False, safety=
|
||||
elif special is True:
|
||||
spec_char += char
|
||||
else:
|
||||
if char in unsafe_chars and safety:
|
||||
raise KeyError(f"Disallowed Pokemon text character '{char}'")
|
||||
try:
|
||||
encoded_text.append(char_map[char])
|
||||
if char in unsafe_chars and safety:
|
||||
raise KeyError(f"Disallowed Pokemon text character '{char}'")
|
||||
except KeyError:
|
||||
if force:
|
||||
encoded_text.append(char_map[" "])
|
||||
|
Reference in New Issue
Block a user