1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 00:28:20 +08:00

Opt: Optimization for swipe action, non-detected as GameStuck

Add: Migrate Operations code into base.py and operations.py
     Add lobby.py
This commit is contained in:
nEEtdo0d
2021-01-05 19:28:28 -05:00
parent 6def46191b
commit 9c360c783e
26 changed files with 458 additions and 9 deletions

View File

@@ -2,12 +2,13 @@ from datetime import datetime, timedelta
from module.guild.assets import GUILD_RED_DOT
from module.guild.base import GUILD_RECORD
from module.guild.lobby import GuildLobby
from module.guild.logistics import GuildLogistics
from module.guild.operations import GuildOperations
from module.logger import logger
from module.ui.ui import page_guild
class RewardGuild(GuildLogistics, GuildOperations):
class RewardGuild(GuildLobby, GuildLogistics, GuildOperations):
def guild_run(self, logistics=True, operations=True):
"""
Execute logistics and operations actions
@@ -21,11 +22,15 @@ class RewardGuild(GuildLogistics, GuildOperations):
return False
# By default, going to page_guild always
# opens in GUILD_LOBBY
# If already in page_guild will ensure
# correct sidebar
# opens into lobby
self.ui_ensure(page_guild)
# Wait for possible report to be displayed
# after entering page_guild
# If already in page guild but not lobby,
# checked on next reward loop
self.guild_lobby()
if logistics:
self.guild_logistics()
@@ -58,8 +63,8 @@ class RewardGuild(GuildLogistics, GuildOperations):
logger.attr(f'{attr}', f'Record time: {guild_record}')
logger.attr(f'{attr}', f'Next update: {update}')
if now > update or self.appear(GUILD_RED_DOT, offset=(30, 30)):
do_logistics = True
do_operations = False
do_logistics = self.config.ENABLE_GUILD_LOGISTICS
do_operations = self.config.ENABLE_GUILD_OPERATIONS
if not self.guild_run(logistics=do_logistics, operations=do_operations):
return False