mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 08:01:30 +08:00
Opt: Receive missions again if reach max holding limit
This commit is contained in:
@@ -172,7 +172,8 @@ class OperationSiren(Reward, OSMap):
|
|||||||
supply (bool): If needs to buy supplies.
|
supply (bool): If needs to buy supplies.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True if all finished.
|
bool: True if all mission received.
|
||||||
|
bool: True if all supplies bought.
|
||||||
"""
|
"""
|
||||||
logger.hr('OS port daily', level=1)
|
logger.hr('OS port daily', level=1)
|
||||||
if np.random.uniform() > 0.5:
|
if np.random.uniform() > 0.5:
|
||||||
@@ -195,10 +196,8 @@ class OperationSiren(Reward, OSMap):
|
|||||||
if supply and supply_success:
|
if supply and supply_success:
|
||||||
supply_success &= self.port_supply_buy()
|
supply_success &= self.port_supply_buy()
|
||||||
self.port_quit()
|
self.port_quit()
|
||||||
if not ((mission and mission_success) or (supply and supply_success)):
|
|
||||||
return False
|
|
||||||
|
|
||||||
return True
|
return mission_success, supply_success
|
||||||
|
|
||||||
def os_finish_daily_mission(self):
|
def os_finish_daily_mission(self):
|
||||||
"""
|
"""
|
||||||
@@ -221,13 +220,20 @@ class OperationSiren(Reward, OSMap):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def os_daily(self):
|
def os_daily(self):
|
||||||
if self.config.OpsiDaily_DoMission or self.config.OpsiDaily_BuySupply:
|
while 1:
|
||||||
self.os_finish_daily_mission()
|
mission_success = True
|
||||||
self.config.check_task_switch()
|
if self.config.OpsiDaily_DoMission or self.config.OpsiDaily_BuySupply:
|
||||||
self.os_port_daily(mission=self.config.OpsiDaily_DoMission, supply=self.config.OpsiDaily_BuySupply)
|
self.os_finish_daily_mission()
|
||||||
|
self.config.check_task_switch()
|
||||||
|
# If unable to receive more dailies, finish them and try again.
|
||||||
|
mission_success, _ = self.os_port_daily(
|
||||||
|
mission=self.config.OpsiDaily_DoMission, supply=self.config.OpsiDaily_BuySupply)
|
||||||
|
|
||||||
if self.config.OpsiDaily_DoMission:
|
if self.config.OpsiDaily_DoMission:
|
||||||
self.os_finish_daily_mission()
|
self.os_finish_daily_mission()
|
||||||
|
|
||||||
|
if mission_success:
|
||||||
|
break
|
||||||
|
|
||||||
self.config.task_delay(server_update=True)
|
self.config.task_delay(server_update=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user