From f87e53b1106ae629aa8cfe5566c51c95eb78fdc5 Mon Sep 17 00:00:00 2001 From: MistEO Date: Mon, 14 Feb 2022 21:44:38 +0800 Subject: [PATCH] =?UTF-8?q?fix.=E4=BF=AE=E5=A4=8D=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=8D=E4=BD=BF=E7=94=A8=E6=97=A0=E4=BA=BA=E6=9C=BA=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=B9=9F=E4=BC=9A=E8=A2=AB=E5=B7=AB=E6=81=8B=E7=BB=84?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=8E=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/MistEO/MeoAssistantArknights/issues/220 --- src/MeoAssistant/DronesForShamareTaskPlugin.cpp | 3 ++- src/MeoAssistant/InfrastProductionTask.cpp | 5 +++++ src/MeoAssistant/InfrastProductionTask.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/MeoAssistant/DronesForShamareTaskPlugin.cpp b/src/MeoAssistant/DronesForShamareTaskPlugin.cpp index 3cb0998f3e..f55c0fbd5f 100644 --- a/src/MeoAssistant/DronesForShamareTaskPlugin.cpp +++ b/src/MeoAssistant/DronesForShamareTaskPlugin.cpp @@ -11,7 +11,8 @@ bool asst::DronesForShamareTaskPlugin::verify(AsstMsg msg, const json::value& de } if (details.at("what").as_string() == "ProductOfFacility" - && details.at("details").at("product").as_string() == "Money") { + && details.at("details").at("product").as_string() == "Money" + && m_cast_ptr->get_uses_of_drone() == "Money") { return true; } else { diff --git a/src/MeoAssistant/InfrastProductionTask.cpp b/src/MeoAssistant/InfrastProductionTask.cpp index 797a47f93d..2ae0d4ee2a 100644 --- a/src/MeoAssistant/InfrastProductionTask.cpp +++ b/src/MeoAssistant/InfrastProductionTask.cpp @@ -20,6 +20,11 @@ asst::InfrastProductionTask& asst::InfrastProductionTask::set_uses_of_drone(std: return *this; } +std::string asst::InfrastProductionTask::get_uses_of_drone() const noexcept +{ + return m_uses_of_drones; +} + void asst::InfrastProductionTask::set_product(std::string product_name) noexcept { m_product = std::move(product_name); diff --git a/src/MeoAssistant/InfrastProductionTask.h b/src/MeoAssistant/InfrastProductionTask.h index 05a96689f1..c9ade75a35 100644 --- a/src/MeoAssistant/InfrastProductionTask.h +++ b/src/MeoAssistant/InfrastProductionTask.h @@ -14,6 +14,7 @@ namespace asst virtual ~InfrastProductionTask() = default; InfrastProductionTask& set_uses_of_drone(std::string uses_of_drones) noexcept; + std::string get_uses_of_drone() const noexcept; protected: bool shift_facility_list();