1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-09 18:39:04 +08:00

Fix: ship attribute in ResearchProject

- ship attribute in research project is overwritten by next output item
This commit is contained in:
LmeSzinc 2020-07-26 17:32:31 +08:00
parent 232ebd38f1
commit ad556cd5ba

View File

@ -102,7 +102,8 @@ class ResearchProject:
self.__setattr__(f'need_{result.group(1)}', True)
for item in data['output']:
result = re.search(self.REGEX_SHIP, item['name'].replace(' ', '').lower())
self.ship = result.group(1) if result else ''
if not self.ship:
self.ship = result.group(1) if result else ''
if self.ship:
self.ship_rarity = 'dr' if self.ship in self.DR_SHIP else 'pry'
break