def check_movement_threads(self): thread_check_button_evade = Thread( target=self.check_movement_threads_func, args=("combat/button_evade", )) thread_check_failed_evade = Thread( target=self.check_movement_threads_func, args=("combat/alert_failed_evade", )) thread_check_alert_info = Thread( target=self.check_movement_threads_func, args=("menu/alert_info", )) thread_check_item_found = Thread( target=self.check_movement_threads_func, args=("menu/item_found", )) thread_check_menu_formation = Thread( target=self.check_movement_threads_func, args=("combat/menu_formation", )) thread_check_menu_loading = Thread( target=self.check_movement_threads_func, args=("combat/menu_loading", )) Utils.multithreader([ thread_check_button_evade, thread_check_failed_evade, thread_check_alert_info, thread_check_item_found, thread_check_menu_formation, thread_check_menu_loading ]) return self.movement_event
def check_movement_threads(self): thread_list = [] # essential threads thread_check_alert_info = Thread( target=self.check_movement_threads_func, args=("menu/alert_info",)) thread_check_menu_formation = Thread( target=self.check_movement_threads_func, args=("combat/menu_formation",)) thread_check_menu_loading = Thread( target=self.check_movement_threads_func, args=("combat/menu_loading",)) thread_list.extend([thread_check_alert_info, thread_check_menu_formation, thread_check_menu_loading]) # threads needed for non-event maps (where mystery nodes appears) if self.chapter_map[0].isdigit(): thread_check_alert_ammo = Thread( target=self.check_movement_threads_func, args=("combat/alert_ammo_supplies",)) thread_check_item_found = Thread( target=self.check_movement_threads_func, args=("menu/item_found",)) thread_list.extend([thread_check_alert_ammo, thread_check_item_found]) # threads needed for story maps without clearing mode enabled if not self.config.combat['clearing_mode']: thread_check_button_evade = Thread( target=self.check_movement_threads_func, args=("combat/button_evade",)) thread_check_failed_evade = Thread( target=self.check_movement_threads_func, args=("combat/alert_failed_evade",)) thread_list.extend([thread_check_button_evade, thread_check_failed_evade]) Utils.multithreader(thread_list) return self.movement_event
def check_morale(self): """Method to multithread the detection of morale states of the fleet. Returns: dict: dict of bools of the different morale states """ thread_check_neutral_morale = Thread(target=self.check_morale_func, args=('neutral', )) thread_check_sad_morale = Thread(target=self.check_morale_func, args=('sad', )) Utils.multithreader( [thread_check_neutral_morale, thread_check_sad_morale]) return self.morale