@@ -48,7 +48,7 @@ def __init__(self, *args, **kwargs):
4848 })
4949 self .config_type ['外部文件夹' ] = {
5050 "type" : "drop_down" ,
51- "options" : self .load_direct_folder (f '{ Path .cwd ()} \mod' ),
51+ "options" : self .load_direct_folder (fr '{ Path .cwd ()} \mod' ),
5252 }
5353
5454 self .config_type ['副本类型' ] = {
@@ -76,8 +76,8 @@ def run(self):
7676 self .set_check_monthly_card ()
7777 try :
7878 path = Path .cwd ()
79- self .script = self .process_json_files (f '{ path } \mod\{ self .config .get ("外部文件夹" )} \scripts' )
80- self .img = self .load_png_files (f '{ path } \mod\{ self .config .get ("外部文件夹" )} \map' )
79+ self .script = self .process_json_files (fr '{ path } \mod\{ self .config .get ("外部文件夹" )} \scripts' )
80+ self .img = self .load_png_files (fr '{ path } \mod\{ self .config .get ("外部文件夹" )} \map' )
8181 if self .config .get ('副本类型' ) == '扼守无尽' :
8282 _to_do_task = self .get_task_by_class (AutoDefence )
8383 elif self .config .get ('副本类型' ) == '探险无尽' :
@@ -165,9 +165,12 @@ def stop_func(self):
165165
166166 def load_direct_folder (self , path ):
167167 folders = []
168+ excluded_keywords = ("builtin" , "示例-脚本工具" )
168169 for item in os .listdir (path ):
169170 item_path = os .path .join (path , item )
170- if os .path .isdir (item_path ) and item != 'builtin' :
171+ if any (keyword in item_path for keyword in excluded_keywords ):
172+ continue
173+ if os .path .isdir (item_path ):
171174 folders .append (item )
172175 return folders
173176
0 commit comments