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):
31
31
self .lang : Optional [Dict [str , str ]] = None
32
32
self .config : Optional [Config ] = None
33
33
34
- def load_json (self , filename : str ) -> Any :
34
+ def load_json (self , filename : str ) -> Dict [ str , str ] :
35
35
script_dir = get_script_path ()
36
36
json_file = script_dir / 'data' / self .game / f'{ filename } .json'
37
37
with open (json_file , 'r' ) as file :
38
38
return json .load (file )
39
39
40
- def load_textdata (self , scriptname : str ) -> Any :
40
+ def load_textdata (self , scriptname : str ) -> Dict [ str , str ] :
41
41
script_dir = get_script_path ()
42
42
lang_file = script_dir / 'out' / 'raw' / f'{ scriptname } .gml'
43
43
ret = {}
@@ -54,6 +54,8 @@ def load_textdata(self, scriptname: str) -> Any:
54
54
matches = textdata_regex .match (line )
55
55
if matches is not None :
56
56
ret [matches [1 ]] = matches [3 ]
57
+ else :
58
+ print ('Match failed for line:' , line )
57
59
print ('Got %d lines' % len (ret ))
58
60
return ret
59
61
You can’t perform that action at this time.
0 commit comments