From a7d6f8ecaaac3626e62880d3b2940a6a42357fb3 Mon Sep 17 00:00:00 2001
From: Anyk00 <1192546235@qq.com>
Date: Sun, 8 Sep 2024 01:50:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
arknights_mower/__main__.py | 1 +
arknights_mower/solvers/base_schedule.py | 10 +++------
arknights_mower/solvers/recruit.py | 5 ++---
ui/src/components/MaaWeeklyNew.vue | 1 -
ui/src/pages/Log.vue | 27 ++++++++++++++++++------
ui/src/pages/Settings.vue | 4 +++-
6 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/arknights_mower/__main__.py b/arknights_mower/__main__.py
index 5dabaf70..8802b77e 100644
--- a/arknights_mower/__main__.py
+++ b/arknights_mower/__main__.py
@@ -1,5 +1,6 @@
import os
from datetime import datetime, timedelta
+
from arknights_mower.solvers.base_schedule import BaseSchedulerSolver
from arknights_mower.solvers.reclamation_algorithm import ReclamationAlgorithm
from arknights_mower.solvers.secret_front import SecretFront
diff --git a/arknights_mower/solvers/base_schedule.py b/arknights_mower/solvers/base_schedule.py
index ef21b9ab..bb2b5d7d 100644
--- a/arknights_mower/solvers/base_schedule.py
+++ b/arknights_mower/solvers/base_schedule.py
@@ -3,23 +3,19 @@
import os
import pathlib
import sys
+import urllib.request
from ctypes import CFUNCTYPE, c_char_p, c_int, c_void_p
from datetime import datetime, timedelta
from typing import Literal
import cv2
-import urllib.request
from arknights_mower.data import agent_list, base_room_list
from arknights_mower.solvers.base_mixin import BaseMixin
from arknights_mower.solvers.credit import CreditSolver
-from arknights_mower.solvers.credit_fight import CreditFight
from arknights_mower.solvers.cultivate_depot import cultivate as cultivateDepotSolver
from arknights_mower.solvers.depotREC import depotREC as DepotSolver
from arknights_mower.solvers.mail import MailSolver
-from arknights_mower.solvers.mission import MissionSolver
-from arknights_mower.solvers.navigation import NavigationSolver
-from arknights_mower.solvers.operation import OperationSolver
from arknights_mower.solvers.reclamation_algorithm import ReclamationAlgorithm
from arknights_mower.solvers.recruit import RecruitSolver
from arknights_mower.solvers.report import ReportSolver
@@ -3173,7 +3169,7 @@ def initialize_maa(self):
raise Exception("Maa Python模块导入失败")
try:
- logger.debug(f"开始更新Maa活动关卡导航……")
+ logger.debug("开始更新Maa活动关卡导航……")
ota_tasks_url = (
"https://ota.maa.plus/MaaAssistantArknights/api/resource/tasks.json"
)
@@ -3183,7 +3179,7 @@ def initialize_maa(self):
res = u.read().decode("utf-8")
with open(ota_tasks_path, "w", encoding="utf-8") as f:
f.write(res)
- logger.info(f"Maa活动关卡导航更新成功")
+ logger.info("Maa活动关卡导航更新成功")
except Exception as e:
logger.error(f"Maa活动关卡导航更新失败:{str(e)}")
diff --git a/arknights_mower/solvers/recruit.py b/arknights_mower/solvers/recruit.py
index e49f87c5..da84eb65 100644
--- a/arknights_mower/solvers/recruit.py
+++ b/arknights_mower/solvers/recruit.py
@@ -16,7 +16,6 @@
from arknights_mower.utils.image import cropimg, thres2
from arknights_mower.utils.log import logger
from arknights_mower.utils.recognize import Recognizer, Scene
-from arknights_mower.utils.vector import va
with lzma.open(f"{__rootdir__}/models/riic_base_digits.pkl", "rb") as f:
number = pickle.load(f)
@@ -100,10 +99,10 @@ def run(self):
#return self.agent_choose, self.result_agent
def transition(self) -> bool:
- if (scene := self.scene()) == Scene.RECRUIT_MAIN:
+ if self.scene() == Scene.RECRUIT_MAIN:
if self.recruit_index > 4:
return True
- if pos := self.find("recruit/ticket"):
+ if self.find("recruit/ticket"):
self.ticket_number = self.get_ticket_number()
self.recruit_index=5
'''if self.ticket_number == 0:
diff --git a/ui/src/components/MaaWeeklyNew.vue b/ui/src/components/MaaWeeklyNew.vue
index f742b38f..f725680b 100644
--- a/ui/src/components/MaaWeeklyNew.vue
+++ b/ui/src/components/MaaWeeklyNew.vue
@@ -48,7 +48,6 @@ const togglePlan = (plan) => {
})
}
-
const changestage = (plan, newstage) => {
plan['stage'] = newstage
console.log(plan['stage'])
diff --git a/ui/src/pages/Log.vue b/ui/src/pages/Log.vue
index 14f79f66..ad61f2f7 100644
--- a/ui/src/pages/Log.vue
+++ b/ui/src/pages/Log.vue
@@ -44,7 +44,7 @@ function start(value) {
running.value = true
log_lines.value = []
if (value == undefined) {
- value = "0"
+ value = '0'
}
axios.get(`${import.meta.env.VITE_HTTP_URL}/start/${value}`)
get_tasks()
@@ -101,7 +101,6 @@ const start_options = [
key: '2'
}
]
-
@@ -136,7 +135,12 @@ const start_options = [
-