mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-04-09 05:53:32 +08:00
Merge branch 'master' into dev
This commit is contained in:
@@ -81,9 +81,10 @@ class OperationSiren(OSMap):
|
|||||||
rescan (None, bool): refer to run_auto_search
|
rescan (None, bool): refer to run_auto_search
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True if all finished.
|
int: Number of missions finished
|
||||||
"""
|
"""
|
||||||
logger.hr('OS finish daily mission', level=1)
|
logger.hr('OS finish daily mission', level=1)
|
||||||
|
count = 0
|
||||||
while 1:
|
while 1:
|
||||||
result = self.os_get_next_mission()
|
result = self.os_get_next_mission()
|
||||||
if not result:
|
if not result:
|
||||||
@@ -101,9 +102,10 @@ class OperationSiren(OSMap):
|
|||||||
submarine_call=self.config.OpsiFleet_Submarine and result != 'pinned_at_archive_zone')
|
submarine_call=self.config.OpsiFleet_Submarine and result != 'pinned_at_archive_zone')
|
||||||
self.run_auto_search(question, rescan)
|
self.run_auto_search(question, rescan)
|
||||||
self.handle_after_auto_search()
|
self.handle_after_auto_search()
|
||||||
|
count += 1
|
||||||
self.config.check_task_switch()
|
self.config.check_task_switch()
|
||||||
|
|
||||||
return True
|
return count
|
||||||
|
|
||||||
def os_daily(self):
|
def os_daily(self):
|
||||||
# Finish existing missions first
|
# Finish existing missions first
|
||||||
@@ -173,6 +175,8 @@ class OperationSiren(OSMap):
|
|||||||
|
|
||||||
self.is_in_opsi_explore = false_func
|
self.is_in_opsi_explore = false_func
|
||||||
self.config.task_switched = false_func
|
self.config.task_switched = false_func
|
||||||
|
count = 0
|
||||||
|
empty_trial = 0
|
||||||
while 1:
|
while 1:
|
||||||
# If unable to receive more dailies, finish them and try again.
|
# If unable to receive more dailies, finish them and try again.
|
||||||
success = self.os_mission_overview_accept()
|
success = self.os_mission_overview_accept()
|
||||||
@@ -181,7 +185,16 @@ class OperationSiren(OSMap):
|
|||||||
# need to confirm that the animation has ended,
|
# need to confirm that the animation has ended,
|
||||||
# or it will click on MAP_GOTO_GLOBE
|
# or it will click on MAP_GOTO_GLOBE
|
||||||
self.zone_init()
|
self.zone_init()
|
||||||
self.os_finish_daily_mission()
|
if empty_trial >= 5:
|
||||||
|
logger.warning('No Opsi dailies found within 5 min, stop waiting')
|
||||||
|
break
|
||||||
|
count += self.os_finish_daily_mission()
|
||||||
|
if not count:
|
||||||
|
logger.warning('Did not receive any OpSi dailies, '
|
||||||
|
'probably game dailies are not refreshed, wait 1 minute')
|
||||||
|
empty_trial += 1
|
||||||
|
self.device.sleep(60)
|
||||||
|
continue
|
||||||
if success:
|
if success:
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -291,6 +304,10 @@ class OperationSiren(OSMap):
|
|||||||
OpsiGeneral_DoRandomMapEvent=True,
|
OpsiGeneral_DoRandomMapEvent=True,
|
||||||
OpsiGeneral_AkashiShopFilter='ActionPoint',
|
OpsiGeneral_AkashiShopFilter='ActionPoint',
|
||||||
)
|
)
|
||||||
|
if self.is_in_opsi_explore():
|
||||||
|
logger.warning(f'OpsiExplore is still running, cannot do {self.config.task.command}')
|
||||||
|
self.config.task_delay(server_update=True)
|
||||||
|
self.config.task_stop()
|
||||||
|
|
||||||
ap_checked = False
|
ap_checked = False
|
||||||
while 1:
|
while 1:
|
||||||
@@ -367,7 +384,8 @@ class OperationSiren(OSMap):
|
|||||||
logger.info('Reach the limit of yellow coins, preserve=100000')
|
logger.info('Reach the limit of yellow coins, preserve=100000')
|
||||||
with self.config.multi_set():
|
with self.config.multi_set():
|
||||||
self.config.task_delay(server_update=True)
|
self.config.task_delay(server_update=True)
|
||||||
self.config.task_call('OpsiMeowfficerFarming')
|
if not self.is_in_opsi_explore():
|
||||||
|
self.config.task_call('OpsiMeowfficerFarming')
|
||||||
self.config.task_stop()
|
self.config.task_stop()
|
||||||
|
|
||||||
self.get_current_zone()
|
self.get_current_zone()
|
||||||
@@ -381,7 +399,8 @@ class OperationSiren(OSMap):
|
|||||||
if self._action_point_total >= 3000:
|
if self._action_point_total >= 3000:
|
||||||
with self.config.multi_set():
|
with self.config.multi_set():
|
||||||
self.config.task_delay(server_update=True)
|
self.config.task_delay(server_update=True)
|
||||||
self.config.task_call('OpsiMeowfficerFarming')
|
if not self.is_in_opsi_explore():
|
||||||
|
self.config.task_call('OpsiMeowfficerFarming')
|
||||||
self.config.task_stop()
|
self.config.task_stop()
|
||||||
|
|
||||||
if self.config.OpsiHazard1Leveling_TargetZone != 0:
|
if self.config.OpsiHazard1Leveling_TargetZone != 0:
|
||||||
@@ -434,6 +453,7 @@ class OperationSiren(OSMap):
|
|||||||
self.config.task_delay(target=next_reset)
|
self.config.task_delay(target=next_reset)
|
||||||
self.config.task_call('OpsiDaily', force_call=False)
|
self.config.task_call('OpsiDaily', force_call=False)
|
||||||
self.config.task_call('OpsiShop', force_call=False)
|
self.config.task_call('OpsiShop', force_call=False)
|
||||||
|
self.config.task_call('OpsiHazard1Leveling', force_call=False)
|
||||||
self.config.task_stop()
|
self.config.task_stop()
|
||||||
|
|
||||||
logger.hr('OS explore', level=1)
|
logger.hr('OS explore', level=1)
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ class VoucherShop(ShopClerk):
|
|||||||
logger.info('Voucher Shop reach bottom, stop')
|
logger.info('Voucher Shop reach bottom, stop')
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
VOUCHER_SHOP_SCROLL.next_page(main=self, page=0.66)
|
# Only 4 rows of items at max, goto bottom directly
|
||||||
|
VOUCHER_SHOP_SCROLL.set_bottom(main=self)
|
||||||
del_cached_property(self, 'shop_grid')
|
del_cached_property(self, 'shop_grid')
|
||||||
del_cached_property(self, 'shop_voucher_items')
|
del_cached_property(self, 'shop_voucher_items')
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user