Skip to content

Commit 1b2785e

Browse files
authored
Undertale fixes
1 parent 8b73b6c commit 1b2785e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

script.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ def highlight_function(
135135
) -> str:
136136
function_name = matches[2]
137137
script_name = f'gml_GlobalScript_{function_name}'
138+
if data.game == 'undertale':
139+
script_name = f'gml_Script_{function_name}'
138140
if script_name not in text:
139141
# This might be a local function
140142
return matches[0]
@@ -211,7 +213,7 @@ def process_line(
211213
flags=re.IGNORECASE
212214
)
213215
line = re.sub(
214-
r'(scr_84_get_lang_string(?:_ch1)?\(")([a-zA-Z0-9_-]+)("\))',
216+
r'(scr_(?:84_get_lang_string(?:_ch1)?|gettext)\(")([a-zA-Z0-9_-]+)("\))',
215217
lambda matches: highlight_text_ch1(matches, data),
216218
line,
217219
flags=re.IGNORECASE

0 commit comments

Comments
 (0)