style: format

This commit is contained in:
zzyyyl
2022-10-28 16:29:35 +08:00
parent 18a7d69769
commit e1b28ea2ef
7 changed files with 28 additions and 21 deletions

View File

@@ -102,7 +102,7 @@
"Home@ReturnTo"
]
},
"StageDrops-Quantity": {
"StageDrops-Quantity": {
"template": "empty.png",
"templThreshold": 3,
"templThreshold_Doc": "这里用来作为字间距阈值",

View File

@@ -52,7 +52,10 @@
1
],
"role_Doc": "填入的职业适用强制方向",
"role": [ "warrior", "pioneer" ],
"role": [
"warrior",
"pioneer"
],
"direction": "up"
},
{
@@ -60,7 +63,9 @@
3,
1
],
"role": [ "sniper" ],
"role": [
"sniper"
],
"direction": "left"
}
]
@@ -688,7 +693,10 @@
4,
4
],
"role": [ "warrior", "pioneer" ],
"role": [
"warrior",
"pioneer"
],
"direction": "left"
},
{
@@ -696,7 +704,10 @@
3,
4
],
"role": [ "warrior", "pioneer" ],
"role": [
"warrior",
"pioneer"
],
"direction": "right"
}
]

View File

@@ -81,7 +81,7 @@ bool asst::RoguelikeCopilotConfiger::parse(const json::value& json)
BattleRole::Warrior, BattleRole::Pioneer, BattleRole::Medic, BattleRole::Tank, BattleRole::Sniper,
BattleRole::Caster, BattleRole::Support, BattleRole::Special, BattleRole::Drone,
};
auto to_lower = [](char c) -> char { return static_cast<char>(std::tolower(c)); };
if (auto opt = stage_info.find<json::array>("role_order")) {
const auto& raw_roles = opt.value();

View File

@@ -3,8 +3,8 @@
#include "../Sub/ProcessTask.h"
#include "Controller.h"
#include "ImageAnalyzer/RoguelikeRecruitImageAnalyzer.h"
#include "Resource/RoguelikeRecruitConfiger.h"
#include "Resource/BattleDataConfiger.h"
#include "Resource/RoguelikeRecruitConfiger.h"
#include "RuntimeStatus.h"
#include "TaskData.h"
#include "Utils/Logger.hpp"

View File

@@ -15,7 +15,7 @@ bool asst::InfrastReceptionTask::_run()
m_all_available_opers.clear();
swipe_to_the_right_of_main_ui();
if (!enter_facility()){
if (!enter_facility()) {
return false;
}
click_bottom_left_tab();

View File

@@ -130,29 +130,25 @@ namespace asst
}
return BattleRole::Unknown;
}
}
} // namespace asst
namespace std
{
inline std::string to_string(const asst::BattleRole& role)
{
static const std::unordered_map<asst::BattleRole, std::string> RoleToName = {
{ asst::BattleRole::Warrior, "Warrior" },
{ asst::BattleRole::Pioneer, "Pioneer" },
{ asst::BattleRole::Medic, "Medic" },
{ asst::BattleRole::Tank, "Tank" },
{ asst::BattleRole::Sniper, "Sniper" },
{ asst::BattleRole::Caster, "Caster" },
{ asst::BattleRole::Support, "Support" },
{ asst::BattleRole::Special, "Special" },
{ asst::BattleRole::Drone, "Drone" },
{ asst::BattleRole::Unknown, "Unknown" }
{ asst::BattleRole::Warrior, "Warrior" }, { asst::BattleRole::Pioneer, "Pioneer" },
{ asst::BattleRole::Medic, "Medic" }, { asst::BattleRole::Tank, "Tank" },
{ asst::BattleRole::Sniper, "Sniper" }, { asst::BattleRole::Caster, "Caster" },
{ asst::BattleRole::Support, "Support" }, { asst::BattleRole::Special, "Special" },
{ asst::BattleRole::Drone, "Drone" }, { asst::BattleRole::Unknown, "Unknown" }
};
return RoleToName.at(role);
}
}
namespace asst {
namespace asst
{
struct BattleRealTimeOper
{
int cost = 0;

View File

@@ -328,7 +328,7 @@ namespace asst
}
return "Invalid";
}
}
} // namespace asst
namespace asst
{