2020-08-14 11:54:30 +08:00
|
|
|
from module.logger import logger
|
2021-09-21 12:46:41 +08:00
|
|
|
from module.meowfficer.assets import *
|
2022-02-06 20:56:52 -05:00
|
|
|
from module.meowfficer.buy import MeowfficerBuy
|
|
|
|
|
from module.meowfficer.fort import MeowfficerFort
|
|
|
|
|
from module.meowfficer.train import MeowfficerTrain
|
|
|
|
|
from module.ui.ui import page_meowfficer
|
2020-08-14 11:54:30 +08:00
|
|
|
|
2021-07-18 19:27:47 -04:00
|
|
|
|
2022-02-06 20:56:52 -05:00
|
|
|
class RewardMeowfficer(MeowfficerBuy, MeowfficerFort, MeowfficerTrain):
|
2021-09-21 12:46:41 +08:00
|
|
|
def run(self):
|
2020-12-05 09:34:12 -05:00
|
|
|
"""
|
2022-02-06 20:56:52 -05:00
|
|
|
Execute buy, enhance, train, and fort operations
|
|
|
|
|
if enabled in configurations
|
2020-12-06 12:25:45 -05:00
|
|
|
|
2020-12-05 09:34:12 -05:00
|
|
|
Pages:
|
|
|
|
|
in: Any page
|
2021-09-21 12:46:41 +08:00
|
|
|
out: page_meowfficer
|
2020-12-05 09:34:12 -05:00
|
|
|
"""
|
2021-09-21 12:46:41 +08:00
|
|
|
if self.config.Meowfficer_BuyAmount <= 0 \
|
|
|
|
|
and not self.config.Meowfficer_TrainMeowfficer \
|
|
|
|
|
and not self.config.Meowfficer_FortChoreMeowfficer:
|
|
|
|
|
self.config.Scheduler_Enable = False
|
|
|
|
|
self.config.task_stop()
|
2020-12-05 09:34:12 -05:00
|
|
|
|
|
|
|
|
self.ui_ensure(page_meowfficer)
|
|
|
|
|
|
2021-09-21 12:46:41 +08:00
|
|
|
if self.config.Meowfficer_BuyAmount > 0:
|
2020-12-05 09:34:12 -05:00
|
|
|
self.meow_buy()
|
2022-02-06 20:56:52 -05:00
|
|
|
if self.config.Meowfficer_EnhanceIndex > 0:
|
|
|
|
|
self.meow_enhance()
|
2021-09-21 12:46:41 +08:00
|
|
|
if self.config.Meowfficer_TrainMeowfficer:
|
2020-12-06 11:40:42 -05:00
|
|
|
self.meow_train()
|
2021-09-21 12:46:41 +08:00
|
|
|
if self.config.Meowfficer_FortChoreMeowfficer:
|
2021-07-18 19:44:35 -04:00
|
|
|
self.meow_fort()
|
|
|
|
|
|
2021-09-21 12:46:41 +08:00
|
|
|
self.config.task_delay(server_update=True)
|