diff --git a/module/map/camera.py b/module/map/camera.py index f0ffd30df..63f88f539 100644 --- a/module/map/camera.py +++ b/module/map/camera.py @@ -303,13 +303,15 @@ class Camera(InfoBarHandler): location = location_ensure(location) grid = np.array(location) - self.camera + self.grids.center_grid - logger.info('Convert_map_to_grid. Map: %s, Camera: %s, grids_center: %s, grid: %s' % ( - location2node(location), str(self.camera), str(self.grids.center_grid), str(grid))) + logger.info('Convert_map_to_grid') + logger.info(f'Map: {location2node(location)}, ' + f'Camera: {location2node(self.camera)}, ' + f'Center: {location2node(self.grids.center_grid)}, ' + f'grid: {location2node(grid)}') if grid in self.grids: return self.grids[grid] else: - logger.warning('Convert_map_to_grid Failed. Map: %s, Camera: %s, grids_center: %s, grid: %s' % ( - location2node(location), str(self.camera), str(self.grids.center_grid), str(grid))) + logger.warning('Convert_map_to_grid Failed.') self.grids.save_error_image() self.focus_to(location) grid = np.array(location) - self.camera + self.grids.center_grid diff --git a/module/map/map.py b/module/map/map.py index 1803d940c..9bc197e3a 100644 --- a/module/map/map.py +++ b/module/map/map.py @@ -304,15 +304,19 @@ class Map(Fleet): if not self.config.MAP_HAS_SIREN: return False - grids = self.map.select(may_siren=True, is_enemy=True) - grids = grids.add(self.map.select(is_siren=True)) - grids = grids.add(self.map.select(is_enemy=True, enemy_scale=0)) - grids = grids.delete(self.map.select(is_boss=True)) logger.info('May siren: %s' % self.map.select(may_siren=True)) logger.info('May siren and is enemy: %s' % self.map.select(may_siren=True, is_enemy=True)) + grids = self.map.select(may_siren=True, is_enemy=True) + logger.info('Is siren: %s' % self.map.select(is_siren=True)) - logger.info('Is 0 scale enemy: %s' % self.map.select(is_enemy=True, enemy_scale=0)) + grids = grids.add(self.map.select(is_siren=True)) + + if self.config.POOR_MAP_DATA or not self.is_map_green: + logger.info('Is 0 scale enemy: %s' % self.map.select(is_enemy=True, enemy_scale=0)) + grids = grids.add(self.map.select(is_enemy=True, enemy_scale=0)) + logger.info('Delete is boss: %s' % self.map.select(is_boss=True)) + grids = grids.delete(self.map.select(is_boss=True)) grids = self.select_grids(grids, **kwargs) diff --git a/module/map/map_base.py b/module/map/map_base.py index 2f8320593..a4b79ae1f 100644 --- a/module/map/map_base.py +++ b/module/map/map_base.py @@ -368,8 +368,10 @@ class CampaignMap: if upper.may_carrier: may['carrier'] += 1 - logger.info('missing: %s' % missing) - logger.info('may: %s' % may) + logger.attr('enemy_missing', + ', '.join([f'{k[:2].upper()}:{str(v).rjust(2)}' for k, v in missing.items() if k != 'battle'])) + logger.attr('enemy_may____', + ', '.join([f'{k[:2].upper()}:{str(v).rjust(2)}' for k, v in may.items()])) return may, missing def missing_is_none(self, battle_count, mystery_count=0, siren_count=0, carrier_count=0):