File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,14 @@ def load_textdata(self, scriptname: str) -> Any:
43
43
ret = {}
44
44
textdata_regex = re .compile (r"ds_map_add\(global\.text_data_[a-z]+, \"([a-zA-Z0-9_]+)\", ([\"'])(.*)\2\)" )
45
45
with open (lang_file , 'r' ) as file :
46
+ print ("Successfully opened" , lang_file )
46
47
for line in file .readlines ():
47
48
if not line .startswith ("ds_map_add" ):
48
49
continue
49
50
line = line .replace ("' + \" '\" + '" , "'" ).replace ('" + \' "\' + "' , '"' )
50
51
matches = textdata_regex .match (line )
51
- ret [matches [1 ]] = matches [3 ]
52
+ if matches is not None :
53
+ ret [matches [1 ]] = matches [3 ]
52
54
return ret
53
55
54
56
def load_enemies (self ) -> List [str ]:
@@ -66,6 +68,7 @@ def load_sums(self) -> Dict[str, str]:
66
68
return self .load_json ('sums' )
67
69
68
70
def load_lang (self ) -> Dict [str , str ]:
71
+ print ("Game:" , self .game )
69
72
if self .game == 'undertale' :
70
73
return self .load_textdata ('gml_Script_textdata_en' )
71
74
return self .load_json ('lang_en' )
You can’t perform that action at this time.
0 commit comments