From 83432093d705b7f9ff581797eb31075efd3b6530 Mon Sep 17 00:00:00 2001 From: MistEO Date: Wed, 7 Dec 2022 20:33:30 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=87=8D=E5=91=BD=E5=90=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=96=87=E4=BB=B6=EF=BC=8C=E4=BF=AE=E5=A4=8Dtask?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/{roguelike_copilot.json => roguelike/copilot.json} | 0 .../{roguelike_recruit.json => roguelike/recruitment.json} | 0 .../{roguelike_shopping.json => roguelike/shopping.json} | 0 src/MaaCore/Config/ResourceLoader.cpp | 6 +++--- src/MaaCore/Config/TaskData.cpp | 2 ++ 5 files changed, 5 insertions(+), 3 deletions(-) rename resource/{roguelike_copilot.json => roguelike/copilot.json} (100%) rename resource/{roguelike_recruit.json => roguelike/recruitment.json} (100%) rename resource/{roguelike_shopping.json => roguelike/shopping.json} (100%) diff --git a/resource/roguelike_copilot.json b/resource/roguelike/copilot.json similarity index 100% rename from resource/roguelike_copilot.json rename to resource/roguelike/copilot.json diff --git a/resource/roguelike_recruit.json b/resource/roguelike/recruitment.json similarity index 100% rename from resource/roguelike_recruit.json rename to resource/roguelike/recruitment.json diff --git a/resource/roguelike_shopping.json b/resource/roguelike/shopping.json similarity index 100% rename from resource/roguelike_shopping.json rename to resource/roguelike/shopping.json diff --git a/src/MaaCore/Config/ResourceLoader.cpp b/src/MaaCore/Config/ResourceLoader.cpp index f1e1e4c7ea..1b9d2fb1c9 100644 --- a/src/MaaCore/Config/ResourceLoader.cpp +++ b/src/MaaCore/Config/ResourceLoader.cpp @@ -52,9 +52,9 @@ bool asst::ResourceLoader::load(const std::filesystem::path& path) LoadResourceAndCheckRet(GeneralConfig, "config.json"_p); LoadResourceAndCheckRet(RecruitConfig, "recruitment.json"_p); LoadResourceAndCheckRet(StageDropsConfig, "stages.json"_p); - LoadResourceAndCheckRet(RoguelikeCopilotConfig, "roguelike_copilot.json"_p); - LoadResourceAndCheckRet(RoguelikeRecruitConfig, "roguelike_recruit.json"_p); - LoadResourceAndCheckRet(RoguelikeShoppingConfig, "roguelike_shopping.json"_p); + LoadResourceAndCheckRet(RoguelikeCopilotConfig, "roguelike"_p / "copilot.json"_p); + LoadResourceAndCheckRet(RoguelikeRecruitConfig, "roguelike"_p / "recruitment.json"_p); + LoadResourceAndCheckRet(RoguelikeShoppingConfig, "roguelike"_p / "shopping.json"_p); LoadResourceAndCheckRet(BattleDataConfig, "battle_data.json"_p); /* load resource with json and template files*/ diff --git a/src/MaaCore/Config/TaskData.cpp b/src/MaaCore/Config/TaskData.cpp index 4a107cadb2..27bfd6fa35 100644 --- a/src/MaaCore/Config/TaskData.cpp +++ b/src/MaaCore/Config/TaskData.cpp @@ -587,6 +587,7 @@ bool asst::TaskData::syntax_check(const std::string& task_name, const json::valu "action", "algorithm", "baseTask", "cache", "exceededNext", "maskRange", "maxTimes", "next", "onErrorNext", "postDelay", "preDelay", "rectMove", "reduceOtherTimes", "roi", "sub", "subErrorIgnored", "templThreshold", "template", + "specialParams" } }, { AlgorithmType::OcrDetect, { @@ -594,6 +595,7 @@ bool asst::TaskData::syntax_check(const std::string& task_name, const json::valu "fullMatch", "isAscii", "maxTimes", "next", "ocrReplace", "onErrorNext", "postDelay", "preDelay", "rectMove", "reduceOtherTimes", "roi", "sub", "subErrorIgnored", "text", "withoutDet", + "specialParams" } }, { AlgorithmType::JustReturn, {