Fix: Unable to find fleets

This commit is contained in:
LmeSzinc 2020-07-25 22:09:54 +08:00
parent 167bcec49d
commit 9a07b271da
12 changed files with 18 additions and 16 deletions

View File

@ -5,8 +5,8 @@ from module.logger import logger
MAP = CampaignMap('A1')
MAP.shape = 'I7'
MAP.camera_data = ['D2', 'D5', 'F2', 'F5']
MAP.camera_data_spawn_point = []
MAP.camera_data = ['D3', 'D5', 'F2', 'F5']
MAP.camera_data_spawn_point = ['D3']
MAP.map_data = """
++ ++ MS ME Me ++ ME -- --
++ ME -- -- -- -- -- Me --

View File

@ -7,7 +7,7 @@ from .a1 import Config as ConfigBase
MAP = CampaignMap('A2')
MAP.shape = 'J6'
MAP.camera_data = ['D2', 'D4', 'G2', 'G4']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D2']
MAP.map_data = """
-- ++ ME MS ++ MB MB MB ++ --
Me -- ME -- ++ -- -- -- ME ME

View File

@ -7,7 +7,7 @@ from .a1 import Config as ConfigBase
MAP = CampaignMap('A3')
MAP.shape = 'H8'
MAP.camera_data = ['D2', 'D6', 'E2', 'E6']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D6']
MAP.map_data = """
ME ++ ++ ++ ME -- -- --
-- -- Me ME -- ++ ++ ME

View File

@ -6,7 +6,7 @@ from module.logger import logger
MAP = CampaignMap('B1')
MAP.shape = 'I8'
MAP.camera_data = ['D2', 'D6', 'F2', 'F6']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D2']
MAP.map_data = """
++ ++ ++ ME -- ME -- ++ --
SP -- Me -- -- -- Me -- ME

View File

@ -7,7 +7,7 @@ from .b1 import Config as ConfigBase
MAP = CampaignMap('B2')
MAP.shape = 'K7'
MAP.camera_data = ['D2', 'D5', 'H2', 'H5']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['H2', 'H5']
MAP.map_data = """
-- ME -- -- MS -- ++ ++ ++ -- --
ME ++ MS -- -- Me -- -- -- Me --

View File

@ -6,7 +6,7 @@ from module.logger import logger
MAP = CampaignMap('C1')
MAP.shape = 'I7'
MAP.camera_data = ['D2', 'D5', 'F2', 'F5']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D3']
MAP.map_data = """
++ ++ MS ME Me ++ ME -- --
++ ME -- -- -- -- -- Me --

View File

@ -7,7 +7,7 @@ from .c1 import Config as ConfigBase
MAP = CampaignMap('C2')
MAP.shape = 'J6'
MAP.camera_data = ['D2', 'D4', 'G2', 'G4']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D2']
MAP.map_data = """
-- ++ ME MS ++ MB MB MB ++ --
Me -- ME -- ++ -- -- -- ME ME

View File

@ -7,7 +7,7 @@ from .c1 import Config as ConfigBase
MAP = CampaignMap('C3')
MAP.shape = 'H8'
MAP.camera_data = ['D2', 'D6', 'E2', 'E6']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D6']
MAP.map_data = """
ME ++ ++ ++ ME -- -- --
-- -- Me ME -- ++ ++ ME

View File

@ -6,7 +6,7 @@ from module.logger import logger
MAP = CampaignMap('D1')
MAP.shape = 'I8'
MAP.camera_data = ['D2', 'D6', 'F2', 'F6']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['D2']
MAP.map_data = """
++ ++ ++ ME -- ME -- ++ --
SP -- Me -- -- -- Me -- ME

View File

@ -7,7 +7,7 @@ from .d1 import Config as ConfigBase
MAP = CampaignMap('D2')
MAP.shape = 'K7'
MAP.camera_data = ['D2', 'D5', 'H2', 'H5']
MAP.camera_data_spawn_point = []
MAP.camera_data_spawn_point = ['H2', 'H5']
MAP.map_data = """
-- ME -- -- MS -- ++ ++ ++ -- --
ME ++ MS -- -- Me -- -- -- Me --

View File

@ -2,7 +2,7 @@ import numpy as np
from module.base.utils import location2node, node2location
from module.logger import logger
from module.map.grid_info import GridInfo
from module.map_detection.grid_info import GridInfo
from module.map.map_grids import SelectedGrids
@ -183,7 +183,7 @@ class CampaignMap:
loca = tuple(offset + grid.location)
if loca in self.grids:
self.grids[loca].update(grid, is_carrier_scan=is_carrier_scan, ignore_may=self.poor_map_data)
self.show()
return True
def reset(self):

View File

@ -144,6 +144,11 @@ class GridInfo:
if info.is_caught_by_siren:
self.is_caught_by_siren = True
if info.is_fleet:
self.is_fleet = True
if info.is_current_fleet:
self.is_current_fleet = True
for item in ['boss', 'siren']:
if info.enemy_scale or self.enemy_scale:
break
@ -191,9 +196,6 @@ class GridInfo:
logger.info(f'Wrong Prediction. Grid: {self}, Attr: {item}')
# failure += 1
self.is_fleet = info.is_fleet
if info.is_current_fleet:
self.is_current_fleet = True
return False
def wipe_out(self):