File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ def __init__(self, game: str):
3131 self .lang : Optional [Dict [str , str ]] = None
3232 self .config : Optional [Config ] = None
3333
34- def load_json (self , filename : str ) -> Any :
34+ def load_json (self , filename : str ) -> Dict [ str , str ] :
3535 script_dir = get_script_path ()
3636 json_file = script_dir / 'data' / self .game / f'{ filename } .json'
3737 with open (json_file , 'r' ) as file :
3838 return json .load (file )
3939
40- def load_textdata (self , scriptname : str ) -> Any :
40+ def load_textdata (self , scriptname : str ) -> Dict [ str , str ] :
4141 script_dir = get_script_path ()
4242 lang_file = script_dir / 'out' / 'raw' / f'{ scriptname } .gml'
4343 ret = {}
@@ -54,6 +54,8 @@ def load_textdata(self, scriptname: str) -> Any:
5454 matches = textdata_regex .match (line )
5555 if matches is not None :
5656 ret [matches [1 ]] = matches [3 ]
57+ else :
58+ print ('Match failed for line:' , line )
5759 print ('Got %d lines' % len (ret ))
5860 return ret
5961
You can’t perform that action at this time.
0 commit comments