def __init__(self, config): """Initializes the primary azurlane-auto instance with the passed in Config instance; creates the Stats instance and resets scheduled sleep timers. Args: config (Config): azurlane-auto Config instance """ self.config = config self.oil_limit = 0 self.stats = Stats(config) if self.config.updates['enabled']: self.modules['updates'] = UpdateUtil(self.config) if self.config.combat['enabled']: self.modules['combat'] = CombatModule(self.config, self.stats) self.oil_limit = self.config.combat['oil_limit'] if self.config.commissions['enabled']: self.modules['commissions'] = CommissionModule(self.config, self.stats) if self.config.enhancement['enabled']: self.modules['enhancement'] = EnhancementModule(self.config, self.stats) if self.config.missions['enabled']: self.modules['missions'] = MissionModule(self.config, self.stats) if self.config.retirement['enabled']: self.modules['retirement'] = RetirementModule(self.config, self.stats) if self.config.dorm['enabled'] or self.config.academy['enabled']: self.modules['headquarters'] = HeadquartersModule(self.config, self.stats) if self.config.events['enabled']: self.modules['event'] = EventModule(self.config, self.stats) self.print_stats_check = True self.next_combat = datetime.now()
def __init__(self, config): """Initializes the primary azurlane-auto instance with the passed in Config instance; creates the Stats instance and resets scheduled sleep timers. Args: config (Config): azurlane-auto Config instance """ self.config = config self.stats = Stats(config) if self.config.commissions['enabled']: self.modules['commissions'] = CommissionModule( self.config, self.stats) if self.config.combat['enabled']: self.modules['combat'] = CombatModule(self.config, self.stats) if self.config.missions['enabled']: self.modules['missions'] = MissionModule(self.config, self.stats) self.print_stats_check = True