Compare commits

...

40 Commits
v3.2 ... v3.3

Author SHA1 Message Date
MistEO
b00378e989 chore.更新版本号v3.3 2022-05-04 23:40:35 +08:00
MistEO
06e2adef6b feat.新增支持贸易站源石碎片自动补货字段 2022-05-04 22:32:08 +08:00
MistEO
4749e3e326 fix.更换作战结束的识别标志,修复升级、剿灭等的掉落识别错误问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/426
2022-05-04 22:19:32 +08:00
MistEO
c4af165b1e chore. Update issue templates 2022-05-04 22:06:37 +08:00
MistEO
797fb41241 Merge branch 'penguin_recognizer_tough' 2022-05-04 21:56:33 +08:00
MistEO
1aa0da1e96 chore.更新企鹅识别库到 v4.2.3 版本,修复磨难关卡的识别 2022-05-04 21:55:59 +08:00
MistEO
1c6810aca9 Merge pull request #431 from zzyyyl/chore/minor_optimization
perf.增加一些日志
2022-05-04 20:42:02 +08:00
zzyyyl
e5fce05360 fix.在因配置错误导致的指针失效时向日志输出信息 2022-05-04 18:08:39 +08:00
zzyyyl
a74ceac116 chore.增加一个日志输出 2022-05-04 14:30:30 +08:00
MistEO
67946e75e7 chore.更新版本号v3.2.2 2022-05-04 02:20:24 +08:00
MistEO
398a4bdd3e feat.更新企鹅识别库4.2.2版本,新增对第十章磨难/普通的识别支持 2022-05-04 02:15:02 +08:00
MistEO
9bc48f21e2 chore.补上漏了的模板图片 2022-05-04 01:56:43 +08:00
MistEO
f4331a5d60 chore.补充一些基建的日志 2022-05-04 01:23:50 +08:00
MistEO
bf66aade3b chore.基建添加心情的日志
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/384
2022-05-04 00:58:23 +08:00
MistEO
a79e961bba fix.修复肉鸽有复活类收藏品,战斗失败后卡住的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/421
2022-05-04 00:35:09 +08:00
MistEO
2152769f79 fix.修复一个肉鸽干员名识别错误的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/414
2022-05-04 00:26:47 +08:00
MistEO
5668e8c04b fix.尝试修复基建不使用无人机的问题 2022-05-04 00:17:19 +08:00
MistEO
c500cbd202 fix.尝试修复肉鸽循环投资的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/422
2022-05-03 23:48:59 +08:00
MistEO
3b5ce56d8a Merge branch 'zzyyyl-feat/1-7' 2022-05-03 23:08:48 +08:00
MistEO
fa05fb937a feat.增加一个缓慢滑动的 ProcessTask action 2022-05-03 23:05:26 +08:00
zzyyyl
d049efb496 perf.优化1-7导航时的滑动逻辑 2022-05-03 22:17:25 +08:00
MistEO
f5b351fe6c Merge pull request #406 from zzyyyl/fix/reconnect
fix.修复某些情况下断线重连可能卡住的问题
2022-05-03 22:01:22 +08:00
zzyyyl
269a0a8e9b style.修复一处英语语法问题 2022-05-03 02:48:58 +08:00
zzyyyl
d83a65c43f feat.增加一些日志信息 2022-05-03 02:22:59 +08:00
zzyyyl
f489498420 fix.修复GameStart按钮缓存位置错误导致无法唤醒的问题 2022-05-03 02:09:25 +08:00
zzyyyl
f08abc2d60 fix.修复某些情况下B服卡在登录界面的问题 2022-05-02 19:06:45 +08:00
zzyyyl
dfab798beb fix.修复某些情况下断线重连可能卡在登录界面的问题 2022-05-02 18:35:09 +08:00
zzyyyl
1507c53c56 fix.继续修复某些情况下断线重连可能卡住的问题 2022-05-02 18:31:31 +08:00
zzyyyl
8ce99baa36 feat.新增对新关卡1-7的支持 2022-05-02 17:52:23 +08:00
zzyyyl
7d1c19046f fix.修复某些情况下断线重连可能卡住的问题 2022-05-02 16:34:46 +08:00
MistEO
6130cff3b3 fix.修复愚人号活动关卡,在某些分辨率下不点代理指挥的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/403
2022-05-02 15:38:52 +08:00
MistEO
a05191fb5e fix.修复刷理智,在某种情况下凌晨4点更新后卡住的问题 2022-05-02 15:36:40 +08:00
MistEO
8b59951a08 fix.修复几个肉鸽干员名的识别错误 2022-05-02 15:26:17 +08:00
MistEO
f8b6264d2d fix.修复肉鸽投资满了数量还在涨的问题 2022-05-02 15:26:17 +08:00
MistEO
a1f0e6a3fd Merge pull request #401 from zzyyyl/fix/StageSN
fix.修复打开`愚人号`关卡时,各种任务出错的问题
2022-05-02 14:48:54 +08:00
zzyyyl
bcf405cef3 fix.修复打开愚人号关卡时,各种任务出错的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/400
2022-05-02 03:41:58 +08:00
MistEO
4271847889 fix.掉落识别改用原图,修复识别错误的问题
https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/395
2022-05-02 00:28:31 +08:00
MistEO
fb3c0b9496 fix.修复愚人号关卡的开始作战的一些问题 2022-05-02 00:08:37 +08:00
MistEO
c62fd8bdda fix.修复打开愚人号关卡时,开始唤醒任务出错的问题(这个界面没返回按钮) 2022-05-01 23:23:47 +08:00
MistEO
8717caf3d8 feat.新增一个代理指挥失误的ui提示 2022-05-01 23:17:47 +08:00
39 changed files with 2156 additions and 1128 deletions

View File

@@ -7,7 +7,9 @@ assignees: ''
---
附上助手软件目录下的`asst.log`日志文件,是可以直接拖拽进来的。
!!!请尽可能详细的描述你遇到的问题,并附上助手软件目录下的 `asst.log` 日志文件
!!!日志文件是可以直接拖拽进来的,没有日志文件的 bug 反馈我会直接关掉!!!
最好再能说明下使用的模拟器、并附上出错时的游戏和软件的截图要是没截到就算啦_(:з」∠)_

View File

@@ -128,6 +128,30 @@ namespace json
value& operator[](const std::string& key);
value& operator[](std::string&& key);
value operator|(const object& rhs)&;
value operator|(object&& rhs)&;
value operator|(const object& rhs)&&;
value operator|(object&& rhs)&&;
value& operator|=(const object& rhs);
value& operator|=(object&& rhs);
//value operator&(const object& rhs)&;
//value operator&(object&& rhs)&;
//value operator&(const object& rhs)&&;
//value operator&(object&& rhs)&&;
//value& operator&=(const object& rhs);
//value& operator&=(object&& rhs);
value operator+(const array& rhs)&;
value operator+(array&& rhs)&;
value operator+(const array& rhs)&&;
value operator+(array&& rhs)&&;
value& operator+=(const array& rhs);
value& operator+=(array&& rhs);
explicit operator bool() const { return as_boolean(); }
explicit operator int() const { return as_integer(); }
explicit operator long() const { return as_long(); }
@@ -141,14 +165,19 @@ namespace json
private:
static var_t deep_copy(const var_t& src);
template <typename... KeysThenDefaultValue, size_t... KeysIndexes>
decltype(auto) get(std::tuple<KeysThenDefaultValue...> keys_then_default_value, std::index_sequence<KeysIndexes...>) const;
decltype(auto) get(
std::tuple<KeysThenDefaultValue...> keys_then_default_value,
std::index_sequence<KeysIndexes...>) const;
template <typename T, typename FirstKey, typename... RestKeys>
decltype(auto) get_aux(T&& default_value, FirstKey&& first, RestKeys &&... rest) const;
template <typename T, typename UniqueKey>
decltype(auto) get_aux(T&& default_value, UniqueKey&& first) const;
const std::string& as_basic_type_str() const;
std::string& as_basic_type_str();
value_type _type = value_type::Null;
var_t _raw_data;
@@ -164,6 +193,7 @@ namespace json
{
public:
using raw_array = std::vector<value>;
using value_type = raw_array::value_type;
using iterator = raw_array::iterator;
using const_iterator = raw_array::const_iterator;
using reverse_iterator = raw_array::reverse_iterator;
@@ -225,6 +255,14 @@ namespace json
const value& operator[](size_t pos) const;
value& operator[](size_t pos);
array operator+(const array& rhs)&;
array operator+(array&& rhs)&;
array operator+(const array& rhs)&&;
array operator+(array&& rhs)&&;
array& operator+=(const array& rhs);
array& operator+=(array&& rhs);
array& operator=(const array&) = default;
array& operator=(array&&) noexcept = default;
@@ -243,13 +281,14 @@ namespace json
{
public:
using raw_object = std::unordered_map<std::string, value>;
using value_type = raw_object::value_type;
using iterator = raw_object::iterator;
using const_iterator = raw_object::const_iterator;
public:
object() = default;
object(const object& rhs) = default;
object(object&& rhs) = default;
object(object&& rhs) noexcept = default;
object(const raw_object& raw_obj);
object(raw_object&& raw_obj);
object(std::initializer_list<raw_object::value_type> init_list);
@@ -283,6 +322,7 @@ namespace json
const value& get(const std::string& key) const;
template <typename... Args> decltype(auto) emplace(Args &&...args);
template <typename... Args> decltype(auto) insert(Args &&...args);
void clear() noexcept;
bool earse(const std::string& key);
@@ -297,6 +337,22 @@ namespace json
value& operator[](const std::string& key);
value& operator[](std::string&& key);
object operator|(const object& rhs)&;
object operator|(object&& rhs)&;
object operator|(const object& rhs)&&;
object operator|(object&& rhs)&&;
object& operator|=(const object& rhs);
object& operator|=(object&& rhs);
//object operator&(const object& rhs)&;
//object operator&(object&& rhs)&;
//object operator&(const object& rhs)&&;
//object operator&(object&& rhs)&&;
//object& operator&=(const object& rhs);
//object& operator&=(object&& rhs);
object& operator=(const object&) = default;
object& operator=(object&&) = default;
@@ -454,20 +510,12 @@ namespace json
MEOJSON_INLINE const value& value::at(size_t pos) const
{
if (is_array()) {
return std::get<array_ptr>(_raw_data)->at(pos);
}
throw exception("Wrong Type or data empty");
return as_array().at(pos);
}
MEOJSON_INLINE const value& value::at(const std::string& key) const
{
if (is_object()) {
return std::get<object_ptr>(_raw_data)->at(key);
}
throw exception("Wrong Type or data empty");
return as_object().at(key);
}
template <typename... KeysThenDefaultValue>
@@ -533,7 +581,7 @@ namespace json
MEOJSON_INLINE bool value::as_boolean() const
{
if (is_boolean()) {
if (std::string b_str = std::get<std::string>(_raw_data);
if (const std::string& b_str = as_basic_type_str();
b_str == "true") {
return true;
}
@@ -552,7 +600,7 @@ namespace json
MEOJSON_INLINE int value::as_integer() const
{
if (is_number()) {
return std::stoi(std::get<std::string>(_raw_data));
return std::stoi(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -574,7 +622,7 @@ namespace json
MEOJSON_INLINE long value::as_long() const
{
if (is_number()) {
return std::stol(std::get<std::string>(_raw_data));
return std::stol(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -584,7 +632,7 @@ namespace json
MEOJSON_INLINE unsigned long value::as_unsigned_long() const
{
if (is_number()) {
return std::stoul(std::get<std::string>(_raw_data));
return std::stoul(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -594,7 +642,7 @@ namespace json
MEOJSON_INLINE long long value::as_long_long() const
{
if (is_number()) {
return std::stoll(std::get<std::string>(_raw_data));
return std::stoll(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -604,7 +652,7 @@ namespace json
MEOJSON_INLINE unsigned long long value::as_unsigned_long_long() const
{
if (is_number()) {
return std::stoull(std::get<std::string>(_raw_data));
return std::stoull(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -614,7 +662,7 @@ namespace json
MEOJSON_INLINE float value::as_float() const
{
if (is_number()) {
return std::stof(std::get<std::string>(_raw_data));
return std::stof(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -624,7 +672,7 @@ namespace json
MEOJSON_INLINE double value::as_double() const
{
if (is_number()) {
return std::stod(std::get<std::string>(_raw_data));
return std::stod(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -634,7 +682,7 @@ namespace json
MEOJSON_INLINE long double value::as_long_double() const
{
if (is_number()) {
return std::stold(std::get<std::string>(_raw_data));
return std::stold(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -644,7 +692,7 @@ namespace json
MEOJSON_INLINE const std::string value::as_string() const
{
if (is_string()) {
return escape_string(std::get<std::string>(_raw_data));
return escape_string(as_basic_type_str());
}
else {
throw exception("Wrong Type");
@@ -671,11 +719,11 @@ namespace json
MEOJSON_INLINE array& value::as_array()
{
if (is_array()) {
return *std::get<array_ptr>(_raw_data);
}
else if (empty()) {
if (empty()) {
*this = array();
}
if (is_array()) {
return *std::get<array_ptr>(_raw_data);
}
@@ -684,17 +732,26 @@ namespace json
MEOJSON_INLINE object& value::as_object()
{
if (is_object()) {
return *std::get<object_ptr>(_raw_data);
}
else if (empty()) {
if (empty()) {
*this = object();
}
if (is_object()) {
return *std::get<object_ptr>(_raw_data);
}
throw exception("Wrong Type or data empty");
}
MEOJSON_INLINE const std::string& value::as_basic_type_str() const
{
return std::get<std::string>(_raw_data);
}
MEOJSON_INLINE std::string& value::as_basic_type_str()
{
return std::get<std::string>(_raw_data);
}
template<typename... Args>
MEOJSON_INLINE decltype(auto) value::array_emplace(Args &&...args)
{
@@ -719,13 +776,13 @@ namespace json
return "null";
case value_type::Boolean:
case value_type::Number:
return std::get<std::string>(_raw_data);
return as_basic_type_str();
case value_type::String:
return '"' + std::get<std::string>(_raw_data) + '"';
return '"' + as_basic_type_str() + '"';
case value_type::Array:
return std::get<array_ptr>(_raw_data)->to_string();
return as_array().to_string();
case value_type::Object:
return std::get<object_ptr>(_raw_data)->to_string();
return as_object().to_string();
default:
throw exception("Unknown Value Type");
}
@@ -739,13 +796,13 @@ namespace json
return "null";
case value_type::Boolean:
case value_type::Number:
return std::get<std::string>(_raw_data);
return as_basic_type_str();
case value_type::String:
return '"' + std::get<std::string>(_raw_data) + '"';
return '"' + as_basic_type_str() + '"';
case value_type::Array:
return std::get<array_ptr>(_raw_data)->format(shift_str, basic_shift_count);
return as_array().format(shift_str, basic_shift_count);
case value_type::Object:
return std::get<object_ptr>(_raw_data)->format(shift_str, basic_shift_count);
return as_object().format(shift_str, basic_shift_count);
default:
throw exception("Unknown Value Type");
}
@@ -763,50 +820,130 @@ namespace json
MEOJSON_INLINE const value& value::operator[](size_t pos) const
{
if (is_array()) {
return std::get<array_ptr>(_raw_data)->operator[](pos);
}
// Array not support to create by operator[]
throw exception("Wrong Type");
return as_array()[pos];
}
MEOJSON_INLINE value& value::operator[](size_t pos)
{
if (is_array()) {
return std::get<array_ptr>(_raw_data)->operator[](pos);
}
// Array not support to create by operator[]
throw exception("Wrong Type");
return as_array()[pos];
}
MEOJSON_INLINE value& value::operator[](const std::string& key)
{
if (is_object()) {
return std::get<object_ptr>(_raw_data)->operator[](key);
}
// Create a new value by operator[]
else if (empty()) {
if (empty()) {
*this = object();
return std::get<object_ptr>(_raw_data)->operator[](key);
}
throw exception("Wrong Type");
return as_object()[key];
}
MEOJSON_INLINE value& value::operator[](std::string&& key)
{
if (is_object()) {
return std::get<object_ptr>(_raw_data)->operator[](key);
}
// Create a new value by operator[]
else if (empty()) {
if (empty()) {
*this = object();
return std::get<object_ptr>(_raw_data)->operator[](key);
}
throw exception("Wrong Type");
return as_object()[std::move(key)];
}
MEOJSON_INLINE value value::operator|(const object& rhs)&
{
return as_object() | rhs;
}
MEOJSON_INLINE value value::operator|(object&& rhs)&
{
return as_object() | std::move(rhs);
}
MEOJSON_INLINE value value::operator|(const object& rhs)&&
{
return std::move(as_object()) | rhs;
}
MEOJSON_INLINE value value::operator|(object&& rhs)&&
{
return std::move(as_object()) | std::move(rhs);
}
MEOJSON_INLINE value& value::operator|=(const object& rhs)
{
as_object() |= rhs;
return *this;
}
MEOJSON_INLINE value& value::operator|=(object&& rhs)
{
as_object() |= std::move(rhs);
return *this;
}
//MEOJSON_INLINE value value::operator&(const object& rhs)&
//{
// return as_object() & rhs;
//}
//MEOJSON_INLINE value value::operator&(object&& rhs)&
//{
// return as_object() & std::move(rhs);
//}
//MEOJSON_INLINE value value::operator&(const object& rhs)&&
//{
// return std::move(as_object()) & rhs;
//}
//MEOJSON_INLINE value value::operator&(object&& rhs)&&
//{
// return std::move(as_object()) & std::move(rhs);
//}
//MEOJSON_INLINE value& value::operator&=(const object& rhs)
//{
// as_object() &= rhs;
// return *this;
//}
//MEOJSON_INLINE value& value::operator&=(object&& rhs)
//{
// as_object() &= std::move(rhs);
// return *this;
//}
MEOJSON_INLINE value value::operator+(const array& rhs)&
{
return as_array() + rhs;
}
MEOJSON_INLINE value value::operator+(array&& rhs)&
{
return as_array() + std::move(rhs);
}
MEOJSON_INLINE value value::operator+(const array& rhs)&&
{
return std::move(as_array()) + rhs;
}
MEOJSON_INLINE value value::operator+(array&& rhs)&&
{
return std::move(as_array()) + std::move(rhs);
}
MEOJSON_INLINE value& value::operator+=(const array& rhs)
{
as_array() += rhs;
return *this;
}
MEOJSON_INLINE value& value::operator+=(array&& rhs)
{
as_array() += std::move(rhs);
return *this;
}
template <typename... Args>
@@ -885,10 +1022,9 @@ namespace json
static_assert(
std::is_constructible<json::value, typename ArrayType::value_type>::value,
"Parameter can't be used to construct a json::value");
_array_data.reserve(arr.size());
for (auto&& ele : arr) {
_array_data.emplace_back(std::move(ele));
}
_array_data.assign(
std::make_move_iterator(arr.begin()),
std::make_move_iterator(arr.end()));
}
MEOJSON_INLINE const value& array::at(size_t pos) const
@@ -1195,6 +1331,50 @@ namespace json
return _array_data[pos];
}
MEOJSON_INLINE array array::operator+(const array& rhs)&
{
array temp = *this;
temp._array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return temp;
}
MEOJSON_INLINE array array::operator+(array&& rhs)&
{
array temp = *this;
temp._array_data.insert(_array_data.end(),
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return temp;
}
MEOJSON_INLINE array array::operator+(const array& rhs)&&
{
_array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return std::move(*this);
}
MEOJSON_INLINE array array::operator+(array&& rhs)&&
{
_array_data.insert(_array_data.end(),
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return std::move(*this);
}
MEOJSON_INLINE array& array::operator+=(const array& rhs)
{
_array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
return *this;
}
MEOJSON_INLINE array& array::operator+=(array&& rhs)
{
_array_data.insert(_array_data.end(),
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return *this;
}
// const raw_array &array::raw_data() const
// {
// return _array_data;
@@ -1211,6 +1391,11 @@ namespace json
return _object_data.emplace(std::forward<Args>(args)...);
}
template <typename... Args> decltype(auto) object::insert(Args &&...args)
{
return _object_data.insert(std::forward<Args>(args)...);
}
MEOJSON_INLINE std::ostream& operator<<(std::ostream& out, const array& arr)
{
// TODO: format output
@@ -1528,6 +1713,108 @@ namespace json
return _object_data[std::move(key)];
}
MEOJSON_INLINE object object::operator|(const object& rhs)&
{
object temp = *this;
temp._object_data.insert(rhs.begin(), rhs.end());
return temp;
}
MEOJSON_INLINE object object::operator|(object&& rhs)&
{
object temp = *this;
//temp._object_data.merge(std::move(rhs._object_data));
temp._object_data.insert(
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return temp;
}
MEOJSON_INLINE object object::operator|(const object& rhs)&&
{
_object_data.insert(rhs.begin(), rhs.end());
return std::move(*this);
}
MEOJSON_INLINE object object::operator|(object&& rhs)&&
{
//_object_data.merge(std::move(rhs._object_data));
_object_data.insert(
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return std::move(*this);
}
MEOJSON_INLINE object& object::operator|=(const object& rhs)
{
_object_data.insert(rhs.begin(), rhs.end());
return *this;
}
MEOJSON_INLINE object& object::operator|=(object&& rhs)
{
_object_data.insert(
std::make_move_iterator(rhs.begin()),
std::make_move_iterator(rhs.end()));
return *this;
}
//MEOJSON_INLINE object object::operator&(const object& rhs)&
//{
// object temp;
// for (const auto& [key, value] : *this) {
// if (rhs.contains(key)) {
// temp.emplace(key, value);
// }
// }
// return temp;
//}
//MEOJSON_INLINE object object::operator&(object&& rhs)&
//{
// object temp;
// for (const auto& [key, value] : *this) {
// if (rhs.contains(key)) {
// temp.emplace(key, value);
// }
// }
// return temp;
//}
//MEOJSON_INLINE object object::operator&(const object& rhs)&&
//{
// object temp;
// for (auto&& [key, value] : *this) {
// if (rhs.contains(key)) {
// temp.emplace(key, std::move(value));
// }
// }
// return temp;
//}
//MEOJSON_INLINE object object::operator&(object&& rhs)&&
//{
// object temp;
// for (auto&& [key, value] : *this) {
// if (rhs.contains(key)) {
// temp.emplace(key, std::move(value));
// }
// }
// return temp;
//}
//MEOJSON_INLINE object& object::operator&=(const object& rhs)
//{
// *this = std::move(*this) & rhs;
// return *this;
//}
//MEOJSON_INLINE object& object::operator&=(object&& rhs)
//{
// *this = std::move(*this) & std::move(rhs);
// return *this;
//}
// const raw_object &object::raw_data() const
// {
// return _object_data;
@@ -1547,10 +1834,9 @@ namespace json
typename MapType::value_type>::value,
"Parameter can't be used to construct a "
"object::raw_object::value_type");
_object_data.reserve(map.size());
for (auto&& ele : map) {
_object_data.emplace(std::move(ele));
}
_object_data.insert(
std::make_move_iterator(map.begin()),
std::make_move_iterator(map.end()));
}
// *************************

View File

@@ -61,11 +61,11 @@ public:
static Resource instance;
return instance;
}
void add(std::string key, std::any src)
void add(const std::string& key, const std::any& src)
{
if (!key.empty())
{
_resource[std::move(key)] = std::move(src);
_resource.insert_or_assign(key, src);
}
}
template <typename ResourceType>

View File

@@ -162,10 +162,10 @@ public:
_templ_list.emplace_back(templ);
}
}
ItemTemplates(const std::string stage_code)
ItemTemplates(const std::string& stage_code, const std::string& difficulty = "NORMAL")
{
const auto& stage_drop =
resource.get<dict>("stage_index")[stage_code]["drops"];
resource.get<dict>("stage_index")[stage_code][difficulty]["drops"];
const auto& item_templs =
resource.get<std::map<std::string, cv::Mat>>("item_templs");
for (const auto& [_, itemId] : stage_drop.items())

View File

@@ -18,25 +18,19 @@
#include "depot.hpp"
#include "result.hpp"
static const std::string version = "4.1.1";
static const std::string version = "4.2.3";
static const std::string opencv_version = CV_VERSION;
cv::Mat decode(std::string JSarrayBuffer)
{
std::vector buf(std::make_move_iterator(JSarrayBuffer.begin()),
std::make_move_iterator(JSarrayBuffer.end()));
return cv::imdecode(buf, cv::IMREAD_COLOR);
}
cv::Mat decode(uint8_t* buffer, size_t size)
{
std::vector buf(buffer, buffer + size);
std::vector<uint8_t> buf(std::make_move_iterator(JSarrayBuffer.begin()),
std::make_move_iterator(JSarrayBuffer.end()));
return cv::imdecode(buf, cv::IMREAD_COLOR);
}
void load_server(std::string server)
{
penguin::server = std::move(server);
penguin::server = server;
}
void load_stage_index() // local
@@ -44,14 +38,13 @@ void load_stage_index() // local
dict stage_index;
std::ifstream f("../resources/json/stage_index.json");
f >> stage_index;
f.close();
penguin::resource.add("stage_index", std::move(stage_index));
penguin::resource.add("stage_index", stage_index);
}
void wload_stage_index(std::string stage_index) // wasm
{
auto& resource = penguin::resource;
resource.add("stage_index", dict::parse(std::move(stage_index)));
resource.add("stage_index", dict::parse(stage_index));
}
void load_hash_index() // local
@@ -59,14 +52,13 @@ void load_hash_index() // local
dict hash_index;
std::ifstream f("../resources/json/hash_index.json");
f >> hash_index;
f.close();
penguin::resource.add("hash_index", std::move(hash_index));
penguin::resource.add("hash_index", hash_index);
}
void wload_hash_index(std::string hash_index) // wasm
{
auto& resource = penguin::resource;
resource.add("hash_index", dict::parse(std::move(hash_index)));
resource.add("hash_index", dict::parse(hash_index));
}
void load_templs() // local
@@ -77,9 +69,9 @@ void load_templs() // local
{
std::string itemId = templ.path().stem().string();
cv::Mat templimg = cv::imread(templ.path().string());
item_templs[std::move(itemId)] = templimg; // cv::Mat is a shallow copy
item_templs.insert_or_assign(itemId, templimg);
}
penguin::resource.add("item_templs", std::move(item_templs));
penguin::resource.add("item_templs", item_templs);
}
void wload_templs(std::string itemId, std::string JSarrayBuffer) // wasm
@@ -91,7 +83,7 @@ void wload_templs(std::string itemId, std::string JSarrayBuffer) // wasm
}
auto& item_templs =
resource.get<std::map<std::string, cv::Mat>>("item_templs");
item_templs[std::move(itemId)] = decode(std::move(JSarrayBuffer));
item_templs.insert_or_assign(itemId, decode(std::move(JSarrayBuffer)));
}
const bool env_check()
@@ -103,9 +95,7 @@ class Recognizer
{
public:
Recognizer(std::string mode)
: _mode(std::move(mode))
{
}
: _mode(mode) {}
dict recognize(cv::Mat img, bool detail = false)
{
@@ -115,7 +105,7 @@ public:
}
std::string wrecognize(std::string JSarrayBuffer, bool detail, bool pretty_print)
{
_wset_img(std::move(JSarrayBuffer));
_wset_img(JSarrayBuffer);
_recognize();
return _wget_report(detail, pretty_print);
}

View File

@@ -123,13 +123,13 @@ private:
void _get_is_result()
{
auto& self = *this;
auto resultrect = cv::boundingRect(_img);
self._relate(resultrect.tl());
if (resultrect.empty())
auto result_rect = cv::boundingRect(_img);
self._relate(result_rect.tl());
if (result_rect.empty())
{
return;
}
_img = _img(resultrect);
_img = _img(result_rect);
auto result_img = _img;
_hash = shash(result_img, ResizeFlags::RESIZE_W32_H8);
std::string hash_std =
@@ -146,6 +146,90 @@ private:
}
};
class Widget_Stars : public Widget
{
public:
const bool is_3stars() const { return _stars == 3; }
Widget_Stars() = default;
Widget_Stars(Widget* const parent_widget)
: Widget("stars", parent_widget) {}
Widget_Stars(const cv::Mat& img, Widget* const parent_widget = nullptr)
: Widget("stars", parent_widget)
{
set_img(img);
}
void set_img(const cv::Mat& img)
{
Widget::set_img(img);
if (_img.channels() == 3)
{
cv::cvtColor(_img, _img, cv::COLOR_BGR2GRAY);
cv::threshold(_img, _img, 127, 255, cv::THRESH_BINARY);
}
}
Widget_Stars& analyze()
{
if (!_img.empty())
{
_get_is_3stars();
}
if (_stars != 3)
{
push_exception(ERROR, ExcSubtypeFlags::EXC_FALSE);
}
return *this;
}
const dict report(bool debug = false)
{
dict rpt = dict::object();
rpt.merge_patch(Widget::report(debug));
if (!debug)
{
rpt["count"] = _stars;
}
else
{
rpt["count"] = _stars;
}
return rpt;
}
private:
size_t _stars = 0;
void _get_is_3stars()
{
auto& self = *this;
auto star_img = _img;
auto sp_ = separate(star_img, DirectionFlags::RIGHT, 1);
auto laststar_range = separate(star_img, DirectionFlags::RIGHT, 1)[0];
auto laststar = star_img(cv::Range(0, height), laststar_range);
auto star_rect = cv::boundingRect(laststar);
if (star_rect.empty())
{
return;
}
auto sp = separate(star_img(cv::Rect(0, 0, width, height / 2)), DirectionFlags::LEFT);
for (auto it = sp.cbegin(); it != sp.cend();)
{
const auto& range = *it;
if (const auto length = range.end - range.start;
length < height * STAR_WIDTH_PROP)
{
it = sp.erase(it);
}
else
{
++it;
}
}
star_rect.x = sp.front().start;
star_rect.width = sp.back().end - star_rect.x;
_img = star_img = star_img(star_rect);
self._relate(star_rect.tl());
_stars = sp.size();
}
};
class Widget_Stage : public WidgetWithCandidate<std::vector<int>, int>
{
public:
@@ -181,7 +265,7 @@ public:
push_exception(ERROR, ExcSubtypeFlags::EXC_NOTFOUND);
}
else if (const auto& stage_index = resource.get<dict>("stage_index");
stage_index[_stage_code()]["existence"] == false)
stage_index[_stage_code()][_difficulty]["existence"] == false)
{
push_exception(ERROR, ExcSubtypeFlags::EXC_ILLEGAL);
}
@@ -229,10 +313,16 @@ public:
}
return rpt;
}
// for temporary workaround
void _set_difficulty(const std::string& difficulty)
{
_difficulty = difficulty;
}
private:
const int _CANDIDATES_COUNT = 5;
bool _existance = false;
std::string _difficulty = "NORMAL"; // for temporary workaround
std::vector<Widget_Character> _stage_chrs;
const std::string _stage_code() const
{
@@ -260,7 +350,7 @@ private:
if (const auto& stage_index = resource.get<dict>("stage_index");
stage_index.contains(stage_code))
{
return (std::string)stage_index[stage_code]["stageId"];
return (std::string)stage_index[stage_code][_difficulty]["stageId"];
}
else
{
@@ -359,36 +449,31 @@ private:
}
};
class Widget_Stars : public Widget
class Widget_Difficulty : public Widget
{
public:
const bool is_3stars() const { return _stars == 3; }
Widget_Stars() = default;
Widget_Stars(Widget* const parent_widget)
: Widget("stars", parent_widget) {}
Widget_Stars(const cv::Mat& img, Widget* const parent_widget = nullptr)
: Widget("stars", parent_widget)
const std::string difficulty() const { return _difficulty; }
Widget_Difficulty() = default;
Widget_Difficulty(Widget* const parent_widget)
: Widget("difficulty", parent_widget) {}
Widget_Difficulty(const cv::Mat& img, Widget* const parent_widget = nullptr)
: Widget("difficulty", parent_widget)
{
set_img(img);
}
void set_img(const cv::Mat& img)
{
Widget::set_img(img);
if (_img.channels() == 3)
{
cv::cvtColor(_img, _img, cv::COLOR_BGR2GRAY);
cv::threshold(_img, _img, 127, 255, cv::THRESH_BINARY);
}
}
Widget_Stars& analyze()
Widget_Difficulty& analyze()
{
if (!_img.empty())
{
_get_is_3stars();
_get_difficulty();
}
if (_stars != 3)
if (_difficulty.empty())
{
push_exception(ERROR, ExcSubtypeFlags::EXC_FALSE);
push_exception(ERROR, ExcSubtypeFlags::EXC_ILLEGAL);
}
return *this;
}
@@ -398,48 +483,63 @@ public:
rpt.merge_patch(Widget::report(debug));
if (!debug)
{
rpt["count"] = _stars;
rpt["difficulty"] = _difficulty;
}
else
{
rpt["count"] = _stars;
rpt["difficulty"] = _difficulty;
}
return rpt;
}
private:
int _stars = 0;
void _get_is_3stars()
std::string _difficulty;
void _get_difficulty()
{
auto& self = *this;
auto star_img = _img;
auto sp_ = separate(star_img, DirectionFlags::RIGHT, 1);
auto laststar_range = separate(star_img, DirectionFlags::RIGHT, 1)[0];
auto laststar = star_img(cv::Range(0, height), laststar_range);
auto starrect = cv::boundingRect(laststar);
if (starrect.empty())
auto img_bin = _img;
cv::cvtColor(img_bin, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 64, 255, cv::THRESH_BINARY);
auto diff_rect = cv::boundingRect(img_bin);
if (diff_rect.empty())
{
return;
}
auto sp = separate(star_img(cv::Rect(0, 0, width, height / 2)), DirectionFlags::LEFT);
for (auto it = sp.cbegin(); it != sp.cend();)
_img = _img(diff_rect);
auto& self = *this;
self._relate(diff_rect.tl());
size_t diff_count = 0;
if (!(height < width / 6))
{
const auto& range = *it;
if (auto length = range.end - range.start;
length < height * STAR_WIDTH_PROP)
{
it = sp.erase(it);
}
else
{
++it;
}
img_bin = _img;
cv::cvtColor(img_bin, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 200, 255, cv::THRESH_BINARY);
int inspction_line = static_cast<int>(0.8 * cv::boundingRect(img_bin).y);
int offset = img_bin.rows;
img_bin = _img;
cv::cvtColor(img_bin, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 64, 255, cv::THRESH_BINARY);
auto diff_img = img_bin(cv::Rect(0, inspction_line, width, 1));
diff_count = separate(diff_img, DirectionFlags::LEFT).size();
_img.adjustROI(static_cast<int>(1.2 * offset), static_cast<int>(1.2 * offset), 0, 0);
y = y - static_cast<int>(1.2 * offset);
}
switch (diff_count)
{
case 0:
case 2:
_difficulty = "NORMAL";
break;
case 3:
_difficulty = "TOUGH";
break;
default:
break;
}
starrect.x = sp.front().start;
starrect.width = sp.back().end - starrect.x;
_img = star_img = star_img(starrect);
self._relate(starrect.tl());
_stars = static_cast<int>(sp.size());
}
};
@@ -627,13 +727,13 @@ private:
self.y++;
}
}
auto droptextrect = cv::boundingRect(droptextimg);
if (droptextrect.empty())
auto droptext_rect = cv::boundingRect(droptextimg);
if (droptext_rect.empty())
{
return;
}
droptextimg = droptextimg(droptextrect);
self._relate(droptextrect.tl());
droptextimg = droptextimg(droptext_rect);
self._relate(droptext_rect.tl());
}
};
@@ -719,9 +819,10 @@ public:
Widget_DropArea() = default;
Widget_DropArea(Widget* const parent_widget)
: Widget("dropArea", parent_widget) {}
Widget_DropArea(const cv::Mat& img, [[maybe_unused]] const std::string& stage, Widget* const parent_widget = nullptr)
Widget_DropArea(const cv::Mat& img, Widget* const parent_widget = nullptr)
: Widget(img, "dropArea", parent_widget) {}
Widget_DropArea& analyze(const std::string& stage)
Widget_DropArea& analyze(const std::string& stage,
const std::string& difficulty)
{
if (!_img.empty())
{
@@ -742,7 +843,7 @@ public:
widget_label = "droptypes";
push_exception(ERROR, ExcSubtypeFlags::EXC_ILLEGAL);
}
_get_drops(stage);
_get_drops(stage, difficulty);
}
else
{
@@ -763,12 +864,12 @@ public:
rpt["drops"] = dict::array();
size_t droptypes_count = _droptype_list.size(); // will move in "for" in C++20
for (size_t i = 0; i < droptypes_count; i++)
for (int i = 0; i < droptypes_count; i++)
{
rpt["dropTypes"].push_back(_droptype_list[i].report(debug));
}
size_t drops_count = _drop_list.size(); // will move in "for" in C++20
for (size_t i = 0; i < drops_count; i++)
for (int i = 0; i < drops_count; i++)
{
rpt["drops"].push_back(
{{"dropType", Droptype2Str[_drop_list[i].droptype]}});
@@ -818,7 +919,8 @@ private:
for (auto it = sp.cbegin(); it != sp.cend();)
{
const auto& range = *it;
if (auto length = range.end - range.start; length < item_diameter)
if (const auto length = range.end - range.start;
length < item_diameter)
{
it = sp.erase(it);
}
@@ -887,7 +989,7 @@ private:
_droptype_list = q.top();
}
void _get_drops(std::string stage)
void _get_drops(const std::string& stage, [[maybe_unused]] const std::string& difficulty)
{
if (_status == StatusFlags::HAS_ERROR || _status == StatusFlags::ERROR)
{
@@ -1111,7 +1213,7 @@ private:
cv::Range(static_cast<int>(bv.y + bv.height * DROP_AREA_Y_PROP), bv.y + bv.height),
cv::Range(static_cast<int>(bv.x + bv.height * DROP_AREA_X_PROP), width));
_drop_area.set_img(drop_area_img);
_drop_area.analyze(_stage.stage_code());
_drop_area.analyze(_stage.stage_code(), "NORMAL");
}
};
@@ -1127,6 +1229,8 @@ public:
_get_result_label();
_get_stars();
_get_stage();
_get_difficulty();
_stage._set_difficulty(_difficutly.difficulty());
_get_drop_area();
return *this;
}
@@ -1146,6 +1250,7 @@ public:
{
rpt["resultLabel"] = _result_label.report()["isResult"];
rpt["stage"] = _stage.report();
rpt["difficulty"] = _difficutly.report()["difficulty"];
rpt["stars"] = _stars.report()["count"];
rpt["dropArea"] = _drop_area.report();
}
@@ -1153,6 +1258,7 @@ public:
{
rpt["resultLabel"] = _result_label.report(debug);
rpt["stage"] = _stage.report(debug);
rpt["difficulty"] = _difficutly.report(debug);
rpt["stars"] = _stars.report(debug);
rpt["dropArea"] = _drop_area.report(debug);
}
@@ -1161,8 +1267,9 @@ public:
private:
Widget _baseline_v {this};
Widget_Stage _stage {this};
Widget_Stars _stars {this};
Widget_Stage _stage {this};
Widget_Difficulty _difficutly {this};
Widget_ResultLabel _result_label {this};
Widget_DropArea _drop_area {this};
@@ -1186,6 +1293,10 @@ private:
{
cv::Mat img_temp = img_bin(cv::Range(0, img_bin.rows), range);
auto sp2 = separate(img_temp, DirectionFlags::TOP);
if (sp2.size() < 2)
{
break;
}
int first_height = sp2.front().end - sp2.front().start;
int last_height = sp2.back().end - sp2.back().start;
if (abs(img_temp.cols - first_height) <= 1 &&
@@ -1302,8 +1413,9 @@ private:
return;
}
const auto& bv = _baseline_v;
auto result_img = _img(cv::Rect(bv.x + bv.width, bv.y,
static_cast<int>(1.6 * bv.height), bv.height));
int left_margin = bv.x + bv.width;
auto result_img = _img(cv::Range(bv.y, bv.y + bv.height / 2),
cv::Range(left_margin, static_cast<int>(left_margin + 1.5 * bv.height)));
cv::Mat img_bin;
cv::cvtColor(result_img, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 200, 255, cv::THRESH_BINARY);
@@ -1319,8 +1431,9 @@ private:
return;
}
const auto& bv = _baseline_v;
auto star_img = _img(cv::Rect(bv.x + bv.width, bv.y,
static_cast<int>(1.2 * bv.height), bv.height));
int left_margin = bv.x + bv.width;
auto star_img = _img(cv::Range(bv.y + bv.height / 2, bv.y + bv.height),
cv::Range(left_margin, static_cast<int>(left_margin + 1.2 * bv.height)));
cv::Mat img_bin;
cv::cvtColor(star_img, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 127, 255, cv::THRESH_BINARY);
@@ -1336,11 +1449,10 @@ private:
return;
}
const auto& bv = _baseline_v;
auto stage_img = _img(cv::Rect(
static_cast<int>(bv.x + bv.width + 0.43 * bv.height),
0,
static_cast<int>(1.6 * bv.height),
bv.y));
int left_margin = bv.x + bv.width;
auto stage_img = _img(cv::Range(0, bv.y),
cv::Range(static_cast<int>(left_margin + 0.43 * bv.height),
static_cast<int>(left_margin + 1.5 * bv.height)));
cv::Mat img_bin;
cv::cvtColor(stage_img, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 200, 255, cv::THRESH_BINARY);
@@ -1349,6 +1461,24 @@ private:
_stage.set_img(stage_img);
_stage.analyze();
}
void _get_difficulty()
{
if (_status == StatusFlags::HAS_ERROR || _status == StatusFlags::ERROR)
{
return;
}
const auto& bv = _baseline_v;
int left_margin = bv.x + bv.width;
auto diff_img = _img(cv::Range(0, bv.y),
cv::Range(left_margin, static_cast<int>(left_margin + 0.43 * bv.height)));
cv::Mat img_bin;
cv::cvtColor(diff_img, img_bin, cv::COLOR_BGR2GRAY);
cv::threshold(img_bin, img_bin, 64, 255, cv::THRESH_BINARY);
diff_img = diff_img(separate(img_bin, DirectionFlags::TOP, 1)[0],
cv::Range(0, img_bin.cols));
_difficutly.set_img(diff_img);
_difficutly.analyze();
}
void _get_drop_area()
{
if (_status == StatusFlags::HAS_ERROR || _status == StatusFlags::ERROR)
@@ -1366,7 +1496,7 @@ private:
cv::Range(top_margin + static_cast<int>(bv.height * DROP_AREA_Y_PROP), top_margin + bv.height),
cv::Range(bv.x + bv.width, width));
_drop_area.set_img(drop_area_img);
_drop_area.analyze(_stage.stage_code());
_drop_area.analyze(_stage.stage_code(), _difficutly.difficulty());
}
};
} // namespace penguin

View File

@@ -80,7 +80,7 @@ MAA 的意思是 MAA Assistant Arknights
- 图像识别库:[opencv](https://github.com/opencv/opencv.git)
- ~~文字识别库:[chineseocr_lite](https://github.com/DayBreak-u/chineseocr_lite.git)~~
- 文字识别库:[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
- 关卡掉落识别:[企鹅物流识别](https://github.com/KumoSiunaus/penguin-stats-recognize-v3)
- 关卡掉落识别:[企鹅物流识别](https://github.com/penguin-statistics/recognizer)
- 地图格子识别:[Arknights-Tile-Pos](https://github.com/yuanyan3060/Arknights-Tile-Pos)
- C++ JSON库[meojson](https://github.com/MistEO/meojson.git)
- C++ 运算符解析器:[calculator](https://github.com/kimwalisch/calculator)

View File

@@ -5,11 +5,181 @@
"next": [
"GameStart",
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer",
"Terminal",
"CloseAnno",
"TodaysSupplies",
"ReturnToTerminal",
"OfflineConfirm"
"OfflineConfirm",
"StageSNFlag"
]
},
"1-7": {
"algorithm": "justreturn",
"action": "doNothing",
"next": [
"StageThemeTo1-7",
"StageThemeEpisode3ToEpisode1To1-7",
"StageThemeEpisode2ToEpisode1To1-7",
"StageThemeEpisode1To1-7",
"Stage1-7"
]
},
"StageThemeTo1-7": {
"template": "StageTheme.png",
"roi": [
200,
640,
300,
60
],
"action": "clickSelf",
"next": [
"StageThemeChapter3ToChapter2To1-7"
]
},
"StageThemeChapter3ToChapter2To1-7": {
"algorithm": "OcrDetect",
"action": "clickSelf",
"text": [
"幻灭"
],
"roi": [
200,
120,
80,
32
],
"cache": false,
"next": [
"StageThemeChapter2ToChapter1To1-7"
]
},
"StageThemeChapter2ToChapter1To1-7": {
"algorithm": "OcrDetect",
"action": "clickSelf",
"text": [
"觉醒"
],
"roi": [
200,
120,
80,
32
],
"cache": false,
"next": [
"StageThemeEpisode3ToEpisode1To1-7",
"StageThemeEpisode2ToEpisode1To1-7",
"StageThemeEpisode1To1-7"
]
},
"StageThemeEpisode3ToEpisode1To1-7": {
"action": "clickSelf",
"roi": [
250,
320,
155,
200
],
"cache": false,
"next": [
"Stage1-7",
"SwipeLeftToStage1-7",
"SwipeRightToStage1-7"
]
},
"StageThemeEpisode2ToEpisode1To1-7": {
"action": "clickSelf",
"roi": [
480,
230,
280,
300
],
"cache": false,
"next": [
"Stage1-7",
"SwipeLeftToStage1-7",
"SwipeRightToStage1-7"
]
},
"StageThemeEpisode1To1-7": {
"action": "clickSelf",
"roi": [
750,
160,
400,
400
],
"cache": false,
"next": [
"Stage1-7",
"SwipeLeftToStage1-7",
"SwipeRightToStage1-7"
]
},
"SwipeLeftToStage1-7": {
"algorithm": "OcrDetect",
"action": "SlowlySwipeToTheLeft",
"text": [
"1-8",
"TR-10",
"1-9",
"1-10",
"1-11",
"1-12"
],
"cache": false,
"roi": [
0,
120,
1080,
480
],
"next": [
"Stage1-7",
"SwipeLeftToStage1-7"
]
},
"SwipeRightToStage1-7": {
"algorithm": "OcrDetect",
"action": "SlowlySwipeToTheRight",
"text": [
"1-1",
"1-2",
"1-3",
"1-4",
"1-5",
"TR-8",
"1-6",
"TR-9"
],
"cache": false,
"roi": [
0,
120,
1080,
480
],
"next": [
"Stage1-7",
"SwipeRightToStage1-7"
]
},
"Stage1-7": {
"algorithm": "OcrDetect",
"action": "clickSelf",
"text": [
"1-7"
],
"cache": false,
"roi": [
0,
190,
1080,
60
]
},
"LS-6": {
@@ -436,7 +606,8 @@
"next": [
"ReturnToTerminal",
"Terminal",
"CloseAnno"
"CloseAnno",
"StageSNReturnToTerminal"
]
},
"FightBegin": {
@@ -459,6 +630,7 @@
200,
120
],
"cache": false,
"templThreshold": 0.7,
"rearDelay": 3000,
"maskRange": [
@@ -468,6 +640,7 @@
"next": [
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer",
"Terminal",
"CloseAnno",
"OfflineConfirm",
@@ -475,7 +648,7 @@
]
},
"StartUpConnectingFlag": {
"action": "doNothing",
"action": "clickSelf",
"roi": [
0,
635,
@@ -483,6 +656,8 @@
85
],
"next": [
"StartToWakeUp",
"StartLoginBServer",
"StartUpConnectingFlag",
"Terminal",
"CloseAnno",
@@ -490,6 +665,23 @@
"TodaysSupplies"
]
},
"StartLoginBServer": {
"action": "clickSelf",
"roi": [
440,
370,
400,
80
],
"next": [
"StartUpConnectingFlag",
"StartLoginBServer",
"Terminal",
"CloseAnno",
"OfflineConfirm",
"TodaysSupplies"
]
},
"ReturnToTerminal": {
"template": "Return.png",
"action": "clickSelf",
@@ -503,7 +695,8 @@
"ReturnToTerminal",
"Terminal",
"ReturnToTerminalConfirm",
"CloseAnno"
"CloseAnno",
"StageSNReturnToTerminal"
]
},
"ReturnToTerminalConfirm": {
@@ -518,7 +711,8 @@
"next": [
"ReturnToTerminal",
"Terminal",
"CloseAnno"
"CloseAnno",
"StageSNReturnToTerminal"
]
},
"UsePrts": {
@@ -546,10 +740,6 @@
"cache": false,
"next": [
"StartButton1"
],
"maskRange": [
50,
255
]
},
"StartButton1": {
@@ -574,24 +764,179 @@
"StartButton2",
"UseMedicine",
"UseStone",
"NoStone"
"NoStone",
"OfflineConfirm"
]
},
"StageSNFlag": {
"template": "StageSNReturnFlag.png",
"cache": false,
"roi": [
284,
509,
242,
141
],
"action": "DoNothing"
},
"StageSNReturnFlag": {
"Doc": "三周年活动关卡“愚人号”的“开始行动”界面,没有返回按钮,点一下返回后面任务出错",
"action": "ClickRect",
"cache": false,
"roi": [
809,
0,
146,
146
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"Stop"
]
},
"StageSNReturnToAward": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToAward"
]
},
"StageSNReturnToFriends": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToFriends"
]
},
"StageSNReturnToInfrast": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToInfrast"
]
},
"StageSNReturnToMall": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToMall"
]
},
"StageSNReturnToRecruit": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToRecruit"
]
},
"StageSNReturnToRoguelike1": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToRoguelike1"
]
},
"StageSNReturnToTerminal": {
"template": "StageSNReturnFlag.png",
"action": "ClickRect",
"cache": false,
"roi": [
284,
509,
242,
141
],
"specificRect": [
20,
20,
135,
35
],
"next": [
"ReturnToTerminal"
]
},
"StartButton2": {
@@ -688,15 +1033,11 @@
]
},
"EndOfAction": {
"algorithm": "OcrDetect",
"text": [
"行动结束"
],
"roi": [
0,
120,
440,
600
11,
357,
153,
143
],
"action": "doNothing",
"next": [
@@ -814,6 +1155,7 @@
400
],
"next": [
"StageSNReturnFlag",
"Stop"
]
},
@@ -846,6 +1188,8 @@
"FightMissionFailed",
"EndOfAction",
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer",
"OfflineConfirm",
"StartButton1"
]
@@ -865,6 +1209,8 @@
"next": [
"EndOfAction",
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer",
"OfflineConfirm",
"StartButton1"
]
@@ -883,7 +1229,9 @@
"PRTS2",
"PrtsErrorConfirm",
"OfflineConfirm",
"StartToWakeUp"
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer"
]
},
"OfflineConfirm": {
@@ -902,6 +1250,7 @@
"CloseAnno",
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer",
"OfflineConfirm",
"TodaysSupplies"
]
@@ -917,6 +1266,7 @@
"next": [
"StartToWakeUp",
"StartUpConnectingFlag",
"StartLoginBServer",
"Terminal",
"CloseAnno",
"OfflineConfirm",
@@ -1018,7 +1368,8 @@
"RecruitFlag",
"Recruit",
"ReturnToRecruit",
"ReturnToRecruitCloseAnno"
"ReturnToRecruitCloseAnno",
"StageSNReturnToRecruit"
]
},
"ReturnToRecruit": {
@@ -1034,7 +1385,8 @@
"Recruit",
"ReturnToRecruit",
"ReturnToRecruitConfirm",
"ReturnToRecruitCloseAnno"
"ReturnToRecruitCloseAnno",
"StageSNReturnToRecruit"
]
},
"ReturnToRecruitConfirm": {
@@ -1049,7 +1401,8 @@
"next": [
"Recruit",
"ReturnToRecruit",
"ReturnToRecruitCloseAnno"
"ReturnToRecruitCloseAnno",
"StageSNReturnToRecruit"
]
},
"ReturnToRecruitCloseAnno": {
@@ -1065,7 +1418,8 @@
"next": [
"Recruit",
"ReturnToRecruitCloseAnno",
"ReturnToRecruit"
"ReturnToRecruit",
"StageSNReturnToRecruit"
]
},
"Recruit": {
@@ -1236,7 +1590,8 @@
"ReceiveAward",
"DailyTask",
"WeeklyTask",
"ReturnToRecruitCloseAnno"
"ReturnToRecruitCloseAnno",
"StageSNReturnToAward"
]
},
"Award": {
@@ -1348,7 +1703,8 @@
"Award",
"ReturnToAward",
"ReturnToAwardConfirm",
"ReturnToRecruitCloseAnno"
"ReturnToRecruitCloseAnno",
"StageSNReturnToAward"
]
},
"ReturnToAwardConfirm": {
@@ -1363,7 +1719,8 @@
"next": [
"Award",
"ReturnToAward",
"ReturnToRecruitCloseAnno"
"ReturnToRecruitCloseAnno",
"StageSNReturnToAward"
]
},
"ReturnToAwardCloseAnno": {
@@ -1379,7 +1736,8 @@
"next": [
"Award",
"ReturnToRecruitCloseAnno",
"ReturnToAward"
"ReturnToAward",
"StageSNReturnToAward"
]
},
"VisitBegin": {
@@ -1392,7 +1750,8 @@
"VisitNext",
"VisitNextBlack",
"ReturnToFriends",
"ReturnToFriendsCloseAnno"
"ReturnToFriendsCloseAnno",
"StageSNReturnToFriends"
]
},
"ReturnToFriends": {
@@ -1408,7 +1767,8 @@
"Friends",
"ReturnToFriends",
"ReturnToFriendsConfirm",
"ReturnToFriendsCloseAnno"
"ReturnToFriendsCloseAnno",
"StageSNReturnToFriends"
]
},
"ReturnToFriendsConfirm": {
@@ -1423,7 +1783,8 @@
"next": [
"Friends",
"ReturnToFriends",
"ReturnToFriendsCloseAnno"
"ReturnToFriendsCloseAnno",
"StageSNReturnToFriends"
]
},
"ReturnToFriendsCloseAnno": {
@@ -1439,7 +1800,8 @@
"next": [
"Friends",
"ReturnToFriends",
"ReturnToFriendsCloseAnno"
"ReturnToFriendsCloseAnno",
"StageSNReturnToFriends"
]
},
"Friends": {
@@ -1541,7 +1903,8 @@
"next": [
"ReturnToMall",
"Mall",
"ReturnToMallCloseAnno"
"ReturnToMallCloseAnno",
"StageSNReturnToMall"
]
},
"ReturnToMall": {
@@ -1557,7 +1920,8 @@
"Mall",
"ReturnToMallConfirm",
"ReturnToMall",
"ReturnToMallCloseAnno"
"ReturnToMallCloseAnno",
"StageSNReturnToMall"
]
},
"ReturnToMallConfirm": {
@@ -1572,7 +1936,8 @@
"next": [
"ReturnToMall",
"Mall",
"ReturnToMallCloseAnno"
"ReturnToMallCloseAnno",
"StageSNReturnToMall"
]
},
"ReturnToMallCloseAnno": {
@@ -1588,7 +1953,8 @@
"next": [
"Mall",
"ReturnToMallCloseAnno",
"ReturnToMall"
"ReturnToMall",
"StageSNReturnToMall"
]
},
"Mall": {
@@ -1971,7 +2337,8 @@
"InfrastEnteredFlag",
"InfrastNotification",
"ReturnToInfrast",
"ReturnToInfrastCloseAnno"
"ReturnToInfrastCloseAnno",
"StageSNReturnToInfrast"
]
},
"ReturnToInfrast": {
@@ -1989,7 +2356,8 @@
"InfrastEnteredFlag",
"ReturnToInfrast",
"ReturnToInfrastConfirm",
"ReturnToInfrastCloseAnno"
"ReturnToInfrastCloseAnno",
"StageSNReturnToInfrast"
]
},
"ReturnToInfrastConfirm": {
@@ -2006,7 +2374,8 @@
"InfrastNotification",
"InfrastEnteredFlag",
"ReturnToInfrast",
"ReturnToInfrastCloseAnno"
"ReturnToInfrastCloseAnno",
"StageSNReturnToInfrast"
]
},
"ReturnToInfrastCloseAnno": {
@@ -2024,7 +2393,8 @@
"InfrastNotification",
"InfrastEnteredFlag",
"ReturnToInfrast",
"ReturnToInfrastCloseAnno"
"ReturnToInfrastCloseAnno",
"StageSNReturnToInfrast"
]
},
"Return": {
@@ -2126,7 +2496,8 @@
"Doc": "不同于贸易站,制造站的无人机是一次性全用掉的,所以只执行一次就够了",
"next": [
"DroneMax",
"DroneConfirm"
"DroneConfirm",
"DroneCancel"
]
},
"DroneAssistTrade": {
@@ -2140,7 +2511,8 @@
],
"next": [
"DroneMax",
"DroneConfirm"
"DroneConfirm",
"DroneCancel"
]
},
"DroneMax": {
@@ -2152,17 +2524,19 @@
80
],
"next": [
"DroneConfirm"
"DroneConfirm",
"DroneCancel"
]
},
"DroneConfirm": {
"action": "clickSelf",
"rearDelay": 3500,
"cache": false,
"roi": [
630,
500,
650,
150
778,
501,
377,
165
],
"next": [
"DroneConfirmLoading",
@@ -2171,6 +2545,16 @@
"DroneAssistMfg"
]
},
"DroneCancel": {
"action": "ClickSelf",
"cache": false,
"roi": [
85,
498,
452,
162
]
},
"DroneConfirmLoading": {
"algorithm": "OcrDetect",
"action": "doNothing",
@@ -2210,6 +2594,29 @@
"template": "DroneAssistTrade.png",
"action": "stop"
},
"ReplenishToMax": {
"action": "ClickSelf",
"roi": [
882,
128,
165,
149
],
"rearDelay": 1000,
"next": [
"ReplenishToMaxConfirm",
"Stop"
]
},
"ReplenishToMaxConfirm": {
"action": "ClickSelf",
"roi": [
854,
504,
192,
187
]
},
"ShamareThumbnail": {
"algorithm": "JustReturn",
"action": "doNothing",
@@ -2362,6 +2769,29 @@
300
]
},
"ProcessTaskSlowlySwipeRightRect": {
"algorithm": "justReturn",
"action": "clickRect",
"specificRect": [
1080,
200,
100,
300
],
"preDelay": 1000,
"rearDelay": 300,
"Doc": "这里的preDelay作为滑动duration使用rearDelay作为滑动额外延时使用"
},
"ProcessTaskSlowlySwipeLeftRect": {
"algorithm": "justReturn",
"action": "clickRect",
"specificRect": [
700,
200,
100,
300
]
},
"InfrastOperListSwipeToTheLeftBegin": {
"algorithm": "justReturn",
"action": "clickRect",
@@ -3895,6 +4325,25 @@
100
],
"next": [
"StartToWakeUpToRoguelike1",
"StartUpConnectingToRoguelike1",
"TerminalToRoguelike1",
"CloseAnnoToRoguelike1",
"TodaysSuppliesToRoguelike1"
]
},
"StartUpConnectingToRoguelike1": {
"template": "StartUpConnectingFlag.png",
"action": "doNothing",
"roi": [
520,
460,
240,
100
],
"next": [
"StartToWakeUpToRoguelike1",
"StartUpConnectingToRoguelike1",
"TerminalToRoguelike1",
"CloseAnnoToRoguelike1",
"TodaysSuppliesToRoguelike1"
@@ -3986,7 +4435,8 @@
"TerminalToRoguelike1",
"ReturnToRoguelike1",
"ReturnToRoguelike1Confirm",
"CloseAnnoToRoguelike1"
"CloseAnnoToRoguelike1",
"StageSNReturnToRoguelike1"
]
},
"ReturnToRoguelike1Confirm": {
@@ -4001,7 +4451,8 @@
"next": [
"TerminalToRoguelike1",
"ReturnToRoguelike1",
"CloseAnnoToRoguelike1"
"CloseAnnoToRoguelike1",
"StageSNReturnToRoguelike1"
]
},
"OfflineConfirmToRoguelike1": {
@@ -4016,6 +4467,7 @@
"next": [
"CloseAnnoToRoguelike1",
"StartToWakeUpToRoguelike1",
"StartUpConnectingToRoguelike1",
"OfflineConfirmToRoguelike1"
]
},
@@ -4032,7 +4484,9 @@
"ReturnToRoguelike1",
"ReturnToRoguelike1Confirm",
"OfflineConfirmToRoguelike1",
"StartToWakeUpToRoguelike1"
"StartToWakeUpToRoguelike1",
"StartUpConnectingToRoguelike1",
"StageSNReturnToRoguelike1"
]
},
"Roguelike1Continue": {
@@ -4343,6 +4797,22 @@
[
"赤赤黑大",
"赫默"
],
[
".+刺",
"棘刺"
],
[
"姜哦",
"嵯峨"
],
[
"健影",
"傀影"
],
[
"^灵鲨",
"幽灵鲨"
]
],
"roi": [
@@ -4562,6 +5032,9 @@
"Roguelike1StageTraderInvestSystemFull": {
"algorithm": "OcrDetect",
"cache": false,
"reduceOtherTimes": [
"Roguelike1StageTraderInvestConfirm"
],
"text": [
"当前储备余额已达上限",
"当前",
@@ -4763,7 +5236,7 @@
700
],
"preDelay": 500,
"templThreshold": 0.99,
"templThreshold": 0.97,
"next": [
"Roguelike1StageEncounterLeaveConfirm"
]
@@ -5262,6 +5735,13 @@
],
"next": [
"Roguelike1Start",
"Roguelike1StageTrader",
"Roguelike1StageSafeHouse",
"Roguelike1StageEncounter",
"Roguelike1StageBoons",
"Roguelike1StageCambatDps",
"Roguelike1StageEmergencyDps",
"Roguelike1StageDreadfulFoe",
"Roguelike1ClickToStartPoint"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -28,6 +28,7 @@
#include "RuntimeStatus.h"
#include "StageDropsTaskPlugin.h"
#include "DronesForShamareTaskPlugin.h"
#include "ReplenishOriginiumShardTaskPlugin.h"
using namespace asst;
@@ -184,6 +185,13 @@ bool asst::Assistant::append_fight(const std::string& stage, int mecidine, int s
if (!m_inited) {
return false;
}
json::value params_info = json::object{
{ "stage", stage },
{ "mecidine", mecidine },
{ "stone", stone },
{ "times", times }
};
Log.trace("asst::Assistant::append_fight | ", params_info.to_string());
constexpr const char* TaskChain = "Fight";
@@ -193,6 +201,7 @@ bool asst::Assistant::append_fight(const std::string& stage, int mecidine, int s
.set_times_limit("GoLastBattle", 0)
.set_times_limit("StartButton1", 0)
.set_times_limit("StartButton2", 0)
.set_times_limit("StageSNReturnFlag", 0)
.set_times_limit("MedicineConfirm", 0)
.set_times_limit("StoneConfirm", 0);
@@ -201,6 +210,7 @@ bool asst::Assistant::append_fight(const std::string& stage, int mecidine, int s
stage_task_ptr->set_tasks({ stage })
.set_times_limit("StartButton1", 0)
.set_times_limit("StartButton2", 0)
.set_times_limit("StageSNReturnFlag", 0)
.set_times_limit("MedicineConfirm", 0)
.set_times_limit("StoneConfirm", 0);
@@ -420,14 +430,15 @@ bool asst::Assistant::append_infrast(infrast::WorkMode work_mode, const std::vec
.set_work_mode(work_mode)
.set_mood_threshold(dorm_threshold)
.set_retry_times(InfrastRetryTimes);
mfg_task_ptr->regiseter_plugin<ReplenishOriginiumShardTaskPlugin>();
auto trade_task_ptr = std::make_shared<InfrastTradeTask>(task_callback, (void*)this, InfrastTaskCahin);
trade_task_ptr->set_uses_of_drone(uses_of_drones)
.set_work_mode(work_mode)
.set_mood_threshold(dorm_threshold)
.set_retry_times(InfrastRetryTimes);
trade_task_ptr->regiseter_plugin<DronesForShamareTaskPlugin>();
auto power_task_ptr = std::make_shared<InfrastPowerTask>(task_callback, (void*)this, InfrastTaskCahin);
power_task_ptr->set_work_mode(work_mode)
.set_mood_threshold(dorm_threshold)

View File

@@ -200,8 +200,10 @@ namespace asst
DoNothing = 0x200, // 什么都不做
Stop = 0x400, // 停止当前Task
BasicSwipe = 0x1000,
SwipeToTheLeft = BasicSwipe | 1, // 往左划一下
SwipeToTheRight = BasicSwipe | 2, // 往右划一下
SwipeToTheLeft = BasicSwipe | 1, // 往左划一下
SwipeToTheRight = BasicSwipe | 2, // 往右划一下
SlowlySwipeToTheLeft = SwipeToTheLeft | 4, // 慢慢的往左划一下
SlowlySwipeToTheRight = SwipeToTheRight | 8 // 慢慢的往右划一下
};
// 任务信息

View File

@@ -476,7 +476,7 @@ std::optional<std::vector<unsigned char>> asst::Controller::call_command(const s
read_num = read(m_pipe_out[PIPE_READ], m_pipe_buffer.get(), PipeBuffSize);
};
} while (::waitpid(m_child, &exit_ret, WNOHANG) == 0 && !check_timeout());
}
}
else {
// failed to create child process
return std::nullopt;
@@ -832,7 +832,7 @@ int asst::Controller::swipe_without_scale(const Rect & r1, const Rect & r2, int
return swipe_without_scale(rand_point_in_rect(r1), rand_point_in_rect(r2), duration, block, extra_delay, extra_swipe);
}
cv::Mat asst::Controller::get_image()
cv::Mat asst::Controller::get_image(bool raw)
{
// 有些模拟器adb偶尔会莫名其妙截图失败多试几次
for (int i = 0; i != 20; ++i) {
@@ -841,6 +841,12 @@ cv::Mat asst::Controller::get_image()
}
}
if (raw) {
std::shared_lock<std::shared_mutex> image_lock(m_image_mutex);
cv::Mat copy = m_cache_image.clone();
return copy;
}
return get_resized_image();
}

View File

@@ -37,7 +37,7 @@ namespace asst
static void set_dirname(std::string dirname) noexcept;
bool try_capture(const EmulatorInfo& info, bool without_handle = false);
cv::Mat get_image();
cv::Mat get_image(bool raw = false);
std::vector<uchar> get_image_encode();
// 点击和滑动都是异步执行返回该任务的id

View File

@@ -199,6 +199,14 @@ size_t asst::InfrastProductionTask::opers_detect()
--cur_available_num;
continue;
}
{
std::string skills_str = "[";
for (const auto& skill : cur_oper.skills) {
skills_str += skill.id + ", ";
}
skills_str += "]";
Log.trace(skills_str, "mood", cur_oper.mood_ratio, "threshold", m_mood_threshold);
}
// 心情过低的干员则不可用
if (cur_oper.mood_ratio < m_mood_threshold) {
//--cur_available_num;

View File

@@ -1,278 +1,280 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="RelWithDebInfo|x64">
<Configuration>RelWithDebInfo</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\AsstCaller.h" />
<ClInclude Include="..\..\include\AsstPort.h" />
<ClInclude Include="AbstractConfiger.h" />
<ClInclude Include="AbstractImageAnalyzer.h" />
<ClInclude Include="AbstractResource.h" />
<ClInclude Include="AbstractTask.h" />
<ClInclude Include="AbstractTaskPlugin.h" />
<ClInclude Include="Assistant.h" />
<ClInclude Include="AsstInfrastDef.h" />
<ClInclude Include="AsstUtils.hpp" />
<ClInclude Include="AsstDef.h" />
<ClInclude Include="AsstMsg.h" />
<ClInclude Include="AutoRecruitTask.h" />
<ClInclude Include="BattleImageAnalyzer.h" />
<ClInclude Include="RoguelikeBattleTaskPlugin.h" />
<ClInclude Include="CreditShopImageAnalyzer.h" />
<ClInclude Include="DronesForShamareTaskPlugin.h" />
<ClInclude Include="GeneralConfiger.h" />
<ClInclude Include="CreditShoppingTask.h" />
<ClInclude Include="HashImageAnalyzer.h" />
<ClInclude Include="InfrastAbstractTask.h" />
<ClInclude Include="InfrastClueImageAnalyzer.h" />
<ClInclude Include="InfrastConfiger.h" />
<ClInclude Include="InfrastControlTask.h" />
<ClInclude Include="InfrastDormTask.h" />
<ClInclude Include="InfrastFacilityImageAnalyzer.h" />
<ClInclude Include="InfrastInfoTask.h" />
<ClInclude Include="InfrastMfgTask.h" />
<ClInclude Include="InfrastOfficeTask.h" />
<ClInclude Include="InfrastOperImageAnalyzer.h" />
<ClInclude Include="InfrastPowerTask.h" />
<ClInclude Include="InfrastProductionTask.h" />
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h" />
<ClInclude Include="InfrastReceptionTask.h" />
<ClInclude Include="InfrastSmileyImageAnalyzer.h" />
<ClInclude Include="InfrastTradeTask.h" />
<ClInclude Include="MultiMatchImageAnalyzer.h" />
<ClInclude Include="OcrImageAnalyzer.h" />
<ClInclude Include="OcrPack.h" />
<ClInclude Include="PenguinPack.h" />
<ClInclude Include="RecruitImageAnalyzer.h" />
<ClInclude Include="AipOcr.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="ItemConfiger.h" />
<ClInclude Include="Logger.hpp" />
<ClInclude Include="RecruitTask.h" />
<ClInclude Include="ProcessTask.h" />
<ClInclude Include="ProcessTaskImageAnalyzer.h" />
<ClInclude Include="RecruitConfiger.h" />
<ClInclude Include="RoguelikeFormationTaskPlugin.h" />
<ClInclude Include="RoguelikeFormationImageAnalyzer.h" />
<ClInclude Include="RuntimeStatus.h" />
<ClInclude Include="StageDropsTaskPlugin.h" />
<ClInclude Include="TaskData.h" />
<ClInclude Include="MatchImageAnalyzer.h" />
<ClInclude Include="TemplResource.h" />
<ClInclude Include="TilePack.h" />
<ClInclude Include="UserConfiger.h" />
<ClInclude Include="Version.h" />
<ClInclude Include="Controller.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AbstractConfiger.cpp" />
<ClCompile Include="AbstractImageAnalyzer.cpp" />
<ClCompile Include="AbstractResource.cpp" />
<ClCompile Include="AbstractTask.cpp" />
<ClCompile Include="AbstractTaskPlugin.cpp" />
<ClCompile Include="AutoRecruitTask.cpp" />
<ClCompile Include="BattleImageAnalyzer.cpp" />
<ClCompile Include="RoguelikeBattleTaskPlugin.cpp" />
<ClCompile Include="CreditShopImageAnalyzer.cpp" />
<ClCompile Include="CreditShoppingTask.cpp" />
<ClCompile Include="DronesForShamareTaskPlugin.cpp" />
<ClCompile Include="HashImageAnalyzer.cpp" />
<ClCompile Include="InfrastAbstractTask.cpp" />
<ClCompile Include="InfrastClueImageAnalyzer.cpp" />
<ClCompile Include="InfrastConfiger.cpp" />
<ClCompile Include="InfrastControlTask.cpp" />
<ClCompile Include="InfrastDormTask.cpp" />
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp" />
<ClCompile Include="InfrastInfoTask.cpp" />
<ClCompile Include="InfrastMfgTask.cpp" />
<ClCompile Include="InfrastOfficeTask.cpp" />
<ClCompile Include="InfrastOperImageAnalyzer.cpp" />
<ClCompile Include="InfrastPowerTask.cpp" />
<ClCompile Include="InfrastProductionTask.cpp" />
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp" />
<ClCompile Include="InfrastReceptionTask.cpp" />
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp" />
<ClCompile Include="InfrastTradeTask.cpp" />
<ClCompile Include="MultiMatchImageAnalyzer.cpp" />
<ClCompile Include="OcrImageAnalyzer.cpp" />
<ClCompile Include="OcrPack.cpp" />
<ClCompile Include="PenguinPack.cpp" />
<ClCompile Include="RecruitImageAnalyzer.cpp" />
<ClCompile Include="AipOcr.cpp" />
<ClCompile Include="Resource.cpp" />
<ClCompile Include="Assistant.cpp" />
<ClCompile Include="AsstCaller.cpp" />
<ClCompile Include="GeneralConfiger.cpp" />
<ClCompile Include="ItemConfiger.cpp" />
<ClCompile Include="RecruitTask.cpp" />
<ClCompile Include="ProcessTask.cpp" />
<ClCompile Include="ProcessTaskImageAnalyzer.cpp" />
<ClCompile Include="RecruitConfiger.cpp" />
<ClCompile Include="RoguelikeFormationTask.cpp" />
<ClCompile Include="RoguelikeFormationImageAnalyzer.cpp" />
<ClCompile Include="RuntimeStatus.cpp" />
<ClCompile Include="StageDropsTaskPlugin.cpp" />
<ClCompile Include="TaskData.cpp" />
<ClCompile Include="MatchImageAnalyzer.cpp" />
<ClCompile Include="TemplResource.cpp" />
<ClCompile Include="TilePack.cpp" />
<ClCompile Include="UserConfiger.cpp" />
<ClCompile Include="Controller.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\resource\config.json" />
<None Include="..\..\resource\infrast.json" />
<None Include="..\..\resource\tasks.json" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{362d1e30-f5ae-4279-9985-65c27b3ba300}</ProjectGuid>
<RootNamespace>MeoAssistant</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(IncludePath)</IncludePath>
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(IncludePath)</IncludePath>
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ppocr.lib;opencv_world453.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<Profile>true</Profile>
<IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="RelWithDebInfo|x64">
<Configuration>RelWithDebInfo</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\AsstCaller.h" />
<ClInclude Include="..\..\include\AsstPort.h" />
<ClInclude Include="AbstractConfiger.h" />
<ClInclude Include="AbstractImageAnalyzer.h" />
<ClInclude Include="AbstractResource.h" />
<ClInclude Include="AbstractTask.h" />
<ClInclude Include="AbstractTaskPlugin.h" />
<ClInclude Include="Assistant.h" />
<ClInclude Include="AsstInfrastDef.h" />
<ClInclude Include="AsstUtils.hpp" />
<ClInclude Include="AsstDef.h" />
<ClInclude Include="AsstMsg.h" />
<ClInclude Include="AutoRecruitTask.h" />
<ClInclude Include="BattleImageAnalyzer.h" />
<ClInclude Include="ReplenishOriginiumShardTaskPlugin.h" />
<ClInclude Include="RoguelikeBattleTaskPlugin.h" />
<ClInclude Include="CreditShopImageAnalyzer.h" />
<ClInclude Include="DronesForShamareTaskPlugin.h" />
<ClInclude Include="GeneralConfiger.h" />
<ClInclude Include="CreditShoppingTask.h" />
<ClInclude Include="HashImageAnalyzer.h" />
<ClInclude Include="InfrastAbstractTask.h" />
<ClInclude Include="InfrastClueImageAnalyzer.h" />
<ClInclude Include="InfrastConfiger.h" />
<ClInclude Include="InfrastControlTask.h" />
<ClInclude Include="InfrastDormTask.h" />
<ClInclude Include="InfrastFacilityImageAnalyzer.h" />
<ClInclude Include="InfrastInfoTask.h" />
<ClInclude Include="InfrastMfgTask.h" />
<ClInclude Include="InfrastOfficeTask.h" />
<ClInclude Include="InfrastOperImageAnalyzer.h" />
<ClInclude Include="InfrastPowerTask.h" />
<ClInclude Include="InfrastProductionTask.h" />
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h" />
<ClInclude Include="InfrastReceptionTask.h" />
<ClInclude Include="InfrastSmileyImageAnalyzer.h" />
<ClInclude Include="InfrastTradeTask.h" />
<ClInclude Include="MultiMatchImageAnalyzer.h" />
<ClInclude Include="OcrImageAnalyzer.h" />
<ClInclude Include="OcrPack.h" />
<ClInclude Include="PenguinPack.h" />
<ClInclude Include="RecruitImageAnalyzer.h" />
<ClInclude Include="AipOcr.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="ItemConfiger.h" />
<ClInclude Include="Logger.hpp" />
<ClInclude Include="RecruitTask.h" />
<ClInclude Include="ProcessTask.h" />
<ClInclude Include="ProcessTaskImageAnalyzer.h" />
<ClInclude Include="RecruitConfiger.h" />
<ClInclude Include="RoguelikeFormationTaskPlugin.h" />
<ClInclude Include="RoguelikeFormationImageAnalyzer.h" />
<ClInclude Include="RuntimeStatus.h" />
<ClInclude Include="StageDropsTaskPlugin.h" />
<ClInclude Include="TaskData.h" />
<ClInclude Include="MatchImageAnalyzer.h" />
<ClInclude Include="TemplResource.h" />
<ClInclude Include="TilePack.h" />
<ClInclude Include="UserConfiger.h" />
<ClInclude Include="Version.h" />
<ClInclude Include="Controller.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AbstractConfiger.cpp" />
<ClCompile Include="AbstractImageAnalyzer.cpp" />
<ClCompile Include="AbstractResource.cpp" />
<ClCompile Include="AbstractTask.cpp" />
<ClCompile Include="AbstractTaskPlugin.cpp" />
<ClCompile Include="AutoRecruitTask.cpp" />
<ClCompile Include="BattleImageAnalyzer.cpp" />
<ClCompile Include="ReplenishOriginiumShardTaskPlugin.cpp" />
<ClCompile Include="RoguelikeBattleTaskPlugin.cpp" />
<ClCompile Include="CreditShopImageAnalyzer.cpp" />
<ClCompile Include="CreditShoppingTask.cpp" />
<ClCompile Include="DronesForShamareTaskPlugin.cpp" />
<ClCompile Include="HashImageAnalyzer.cpp" />
<ClCompile Include="InfrastAbstractTask.cpp" />
<ClCompile Include="InfrastClueImageAnalyzer.cpp" />
<ClCompile Include="InfrastConfiger.cpp" />
<ClCompile Include="InfrastControlTask.cpp" />
<ClCompile Include="InfrastDormTask.cpp" />
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp" />
<ClCompile Include="InfrastInfoTask.cpp" />
<ClCompile Include="InfrastMfgTask.cpp" />
<ClCompile Include="InfrastOfficeTask.cpp" />
<ClCompile Include="InfrastOperImageAnalyzer.cpp" />
<ClCompile Include="InfrastPowerTask.cpp" />
<ClCompile Include="InfrastProductionTask.cpp" />
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp" />
<ClCompile Include="InfrastReceptionTask.cpp" />
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp" />
<ClCompile Include="InfrastTradeTask.cpp" />
<ClCompile Include="MultiMatchImageAnalyzer.cpp" />
<ClCompile Include="OcrImageAnalyzer.cpp" />
<ClCompile Include="OcrPack.cpp" />
<ClCompile Include="PenguinPack.cpp" />
<ClCompile Include="RecruitImageAnalyzer.cpp" />
<ClCompile Include="AipOcr.cpp" />
<ClCompile Include="Resource.cpp" />
<ClCompile Include="Assistant.cpp" />
<ClCompile Include="AsstCaller.cpp" />
<ClCompile Include="GeneralConfiger.cpp" />
<ClCompile Include="ItemConfiger.cpp" />
<ClCompile Include="RecruitTask.cpp" />
<ClCompile Include="ProcessTask.cpp" />
<ClCompile Include="ProcessTaskImageAnalyzer.cpp" />
<ClCompile Include="RecruitConfiger.cpp" />
<ClCompile Include="RoguelikeFormationTask.cpp" />
<ClCompile Include="RoguelikeFormationImageAnalyzer.cpp" />
<ClCompile Include="RuntimeStatus.cpp" />
<ClCompile Include="StageDropsTaskPlugin.cpp" />
<ClCompile Include="TaskData.cpp" />
<ClCompile Include="MatchImageAnalyzer.cpp" />
<ClCompile Include="TemplResource.cpp" />
<ClCompile Include="TilePack.cpp" />
<ClCompile Include="UserConfiger.cpp" />
<ClCompile Include="Controller.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\resource\config.json" />
<None Include="..\..\resource\infrast.json" />
<None Include="..\..\resource\tasks.json" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{362d1e30-f5ae-4279-9985-65c27b3ba300}</ProjectGuid>
<RootNamespace>MeoAssistant</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(IncludePath)</IncludePath>
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)include;$(SolutionDir)3rdparty\include;$(IncludePath)</IncludePath>
<LibraryPath>$(TargetDir);$(SolutionDir)\3rdparty\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ppocr.lib;opencv_world453.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<Profile>true</Profile>
<IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>xcopy /e /y /i /c $(SolutionDir)resource $(TargetDir)resource
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>copy resource</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>copy 3rd party dll</Message>
</PreLinkEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<FunctionLevelLinking>
</FunctionLevelLinking>
<IntrinsicFunctions>false</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;ASST_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>true</WholeProgramOptimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ppocr.lib;opencv_world453.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<Profile>true</Profile>
<IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>copy resource</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>copy 3rd party dll</Message>
</PreLinkEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<FunctionLevelLinking>
</FunctionLevelLinking>
<IntrinsicFunctions>false</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;ASST_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>true</WholeProgramOptimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<AdditionalOptions>/utf-8 /MP %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ppocr.lib;opencv_world453.lib;zlibstatic.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<Profile>true</Profile>
<IgnoreSpecificDefaultLibraries>msvcrt.lib</IgnoreSpecificDefaultLibraries>
</Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>xcopy /e /y /i /c $(SolutionDir)resource $(TargetDir)resource
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>copy resource</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>copy 3rd party dll</Message>
</PreLinkEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties />
</VisualStudio>
</ProjectExtensions>
xcopy /e /y /i /c $(SolutionDir)3rdparty\resource $(TargetDir)resource</Command>
</PostBuildEvent>
<PostBuildEvent>
<Message>copy resource</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>xcopy /e /y /i /c $(SolutionDir)3rdparty\bin $(TargetDir)</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>copy 3rd party dll</Message>
</PreLinkEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -1,428 +1,434 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="头文件\Caller">
<UniqueIdentifier>{81d86994-0d89-4cc2-aa6f-d726a0bd0490}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Task">
<UniqueIdentifier>{3b93d9f2-728c-4a22-bc13-57ce7df5806c}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Task">
<UniqueIdentifier>{1ef28df7-c174-4032-bbcf-9722ae53852d}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Caller">
<UniqueIdentifier>{557d6d96-11d9-46e1-b611-b2b8216abea6}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\ImageAnalyzer">
<UniqueIdentifier>{1a8ffc31-8eb3-4af6-9065-634de2463a3e}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\ImageAnalyzer">
<UniqueIdentifier>{c6a0898b-5dd7-4437-981c-00e53b30a60d}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Resource">
<UniqueIdentifier>{07a812fe-6b28-4be0-b6d4-33554824d3c5}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Resource">
<UniqueIdentifier>{74bd94e1-4973-412a-a17a-d8457de387af}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Utils">
<UniqueIdentifier>{87c9dee5-847b-41e6-818e-387a6385ea8b}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\ImageAnalyzer\Infrast">
<UniqueIdentifier>{a37e0b23-e8f8-499c-adf5-9990277e9ffe}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\ImageAnalyzer\General">
<UniqueIdentifier>{51165426-1842-491a-b5d5-9d26c59facdd}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\ImageAnalyzer\General">
<UniqueIdentifier>{c600668a-0d70-4694-b1e5-6a78cffd0b1a}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\ImageAnalyzer\Infrast">
<UniqueIdentifier>{d173e449-880b-4064-bbab-97007e3d090b}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Task\Infrast">
<UniqueIdentifier>{fc8aa302-89bb-4016-924d-10177dc8b334}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Task\Infrast">
<UniqueIdentifier>{9a6160e3-cd35-4dda-ba04-23ede1878740}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Requester">
<UniqueIdentifier>{a5c43813-70af-4b0e-94ac-9ddecc2e4a3c}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Requester">
<UniqueIdentifier>{6cd85910-b561-4cf3-85a2-20be3cd1dd76}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\TaskPlugin">
<UniqueIdentifier>{34a52261-b34b-49ac-8102-22b0125617f5}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\TaskPlugin">
<UniqueIdentifier>{f5faaa93-ae82-472e-9c59-9eccc29294a0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Controller.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Assistant.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="RecruitConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="GeneralConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="AsstDef.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="AsstUtils.hpp">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="Version.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="Logger.hpp">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="..\..\include\AsstCaller.h">
<Filter>头文件\Caller</Filter>
</ClInclude>
<ClInclude Include="..\..\include\AsstPort.h">
<Filter>头文件\Caller</Filter>
</ClInclude>
<ClInclude Include="AbstractTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="RecruitTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="ProcessTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="AsstMsg.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="AbstractConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="UserConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="CreditShoppingTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="ItemConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="ProcessTaskImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="TemplResource.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="AbstractResource.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="OcrPack.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="PenguinPack.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="RecruitImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="Resource.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CreditShopImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="AbstractImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="MatchImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="MultiMatchImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="OcrImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="InfrastSmileyImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="InfrastFacilityImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="RuntimeStatus.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastAbstractTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastDormTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastInfoTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastMfgTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastOfficeTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastPowerTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastProductionTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastReceptionTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastTradeTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastClueImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="AsstInfrastDef.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="InfrastOperImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="TaskData.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="AutoRecruitTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="InfrastControlTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="AipOcr.h">
<Filter>头文件\Requester</Filter>
</ClInclude>
<ClInclude Include="AbstractTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="StageDropsTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="DronesForShamareTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="BattleImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="HashImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="RoguelikeFormationImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="RoguelikeBattleTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="RoguelikeFormationTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="TilePack.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Controller.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Assistant.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="RecruitConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="GeneralConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="AbstractTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="RecruitTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="ProcessTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="AsstCaller.cpp">
<Filter>源文件\Caller</Filter>
</ClCompile>
<ClCompile Include="AbstractConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="UserConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="CreditShoppingTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="ItemConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="ProcessTaskImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="TemplResource.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="AbstractResource.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="OcrPack.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="PenguinPack.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="RecruitImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="Resource.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CreditShopImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="AbstractImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="MatchImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="MultiMatchImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="OcrImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="InfrastConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="RuntimeStatus.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="InfrastAbstractTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastDormTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastInfoTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastMfgTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastOfficeTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastPowerTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastProductionTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastTradeTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastClueImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastReceptionTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastOperImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="TaskData.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="AutoRecruitTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="InfrastControlTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="AipOcr.cpp">
<Filter>源文件\Requester</Filter>
</ClCompile>
<ClCompile Include="AbstractTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="StageDropsTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="DronesForShamareTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="BattleImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="HashImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="RoguelikeFormationImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="RoguelikeBattleTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="RoguelikeFormationTask.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="TilePack.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\resource\config.json">
<Filter>资源文件</Filter>
</None>
<None Include="..\..\resource\tasks.json">
<Filter>资源文件</Filter>
</None>
<None Include="..\..\resource\infrast.json">
<Filter>资源文件</Filter>
</None>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="头文件\Caller">
<UniqueIdentifier>{81d86994-0d89-4cc2-aa6f-d726a0bd0490}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Task">
<UniqueIdentifier>{3b93d9f2-728c-4a22-bc13-57ce7df5806c}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Task">
<UniqueIdentifier>{1ef28df7-c174-4032-bbcf-9722ae53852d}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Caller">
<UniqueIdentifier>{557d6d96-11d9-46e1-b611-b2b8216abea6}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\ImageAnalyzer">
<UniqueIdentifier>{1a8ffc31-8eb3-4af6-9065-634de2463a3e}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\ImageAnalyzer">
<UniqueIdentifier>{c6a0898b-5dd7-4437-981c-00e53b30a60d}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Resource">
<UniqueIdentifier>{07a812fe-6b28-4be0-b6d4-33554824d3c5}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Resource">
<UniqueIdentifier>{74bd94e1-4973-412a-a17a-d8457de387af}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Utils">
<UniqueIdentifier>{87c9dee5-847b-41e6-818e-387a6385ea8b}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\ImageAnalyzer\Infrast">
<UniqueIdentifier>{a37e0b23-e8f8-499c-adf5-9990277e9ffe}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\ImageAnalyzer\General">
<UniqueIdentifier>{51165426-1842-491a-b5d5-9d26c59facdd}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\ImageAnalyzer\General">
<UniqueIdentifier>{c600668a-0d70-4694-b1e5-6a78cffd0b1a}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\ImageAnalyzer\Infrast">
<UniqueIdentifier>{d173e449-880b-4064-bbab-97007e3d090b}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Task\Infrast">
<UniqueIdentifier>{fc8aa302-89bb-4016-924d-10177dc8b334}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Task\Infrast">
<UniqueIdentifier>{9a6160e3-cd35-4dda-ba04-23ede1878740}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\Requester">
<UniqueIdentifier>{a5c43813-70af-4b0e-94ac-9ddecc2e4a3c}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\Requester">
<UniqueIdentifier>{6cd85910-b561-4cf3-85a2-20be3cd1dd76}</UniqueIdentifier>
</Filter>
<Filter Include="头文件\TaskPlugin">
<UniqueIdentifier>{34a52261-b34b-49ac-8102-22b0125617f5}</UniqueIdentifier>
</Filter>
<Filter Include="源文件\TaskPlugin">
<UniqueIdentifier>{f5faaa93-ae82-472e-9c59-9eccc29294a0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Controller.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="Assistant.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="RecruitConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="GeneralConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="AsstDef.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="AsstUtils.hpp">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="Version.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="Logger.hpp">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="..\..\include\AsstCaller.h">
<Filter>头文件\Caller</Filter>
</ClInclude>
<ClInclude Include="..\..\include\AsstPort.h">
<Filter>头文件\Caller</Filter>
</ClInclude>
<ClInclude Include="AbstractTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="RecruitTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="ProcessTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="AsstMsg.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="AbstractConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="UserConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="CreditShoppingTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="ItemConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="ProcessTaskImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="TemplResource.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="AbstractResource.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="OcrPack.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="PenguinPack.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="RecruitImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="Resource.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CreditShopImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="AbstractImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="MatchImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="MultiMatchImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="OcrImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="InfrastSmileyImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastConfiger.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="InfrastFacilityImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="RuntimeStatus.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="InfrastClueVacancyImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastAbstractTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastDormTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastInfoTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastMfgTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastOfficeTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastPowerTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastProductionTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastReceptionTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastTradeTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="InfrastClueImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="AsstInfrastDef.h">
<Filter>头文件\Utils</Filter>
</ClInclude>
<ClInclude Include="InfrastOperImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\Infrast</Filter>
</ClInclude>
<ClInclude Include="TaskData.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="AutoRecruitTask.h">
<Filter>头文件\Task</Filter>
</ClInclude>
<ClInclude Include="InfrastControlTask.h">
<Filter>头文件\Task\Infrast</Filter>
</ClInclude>
<ClInclude Include="AipOcr.h">
<Filter>头文件\Requester</Filter>
</ClInclude>
<ClInclude Include="AbstractTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="StageDropsTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="DronesForShamareTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="BattleImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="HashImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer\General</Filter>
</ClInclude>
<ClInclude Include="RoguelikeFormationImageAnalyzer.h">
<Filter>头文件\ImageAnalyzer</Filter>
</ClInclude>
<ClInclude Include="RoguelikeBattleTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="RoguelikeFormationTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
<ClInclude Include="TilePack.h">
<Filter>头文件\Resource</Filter>
</ClInclude>
<ClInclude Include="ReplenishOriginiumShardTaskPlugin.h">
<Filter>头文件\TaskPlugin</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Controller.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="Assistant.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="RecruitConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="GeneralConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="AbstractTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="RecruitTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="ProcessTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="AsstCaller.cpp">
<Filter>源文件\Caller</Filter>
</ClCompile>
<ClCompile Include="AbstractConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="UserConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="CreditShoppingTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="ItemConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="ProcessTaskImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="TemplResource.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="AbstractResource.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="OcrPack.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="PenguinPack.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="RecruitImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="Resource.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CreditShopImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="InfrastSmileyImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="AbstractImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="MatchImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="MultiMatchImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="OcrImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="InfrastConfiger.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="InfrastFacilityImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="RuntimeStatus.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="InfrastAbstractTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastDormTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastInfoTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastMfgTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastOfficeTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastPowerTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastProductionTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastTradeTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastClueVacancyImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastClueImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastReceptionTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="InfrastOperImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\Infrast</Filter>
</ClCompile>
<ClCompile Include="TaskData.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="AutoRecruitTask.cpp">
<Filter>源文件\Task</Filter>
</ClCompile>
<ClCompile Include="InfrastControlTask.cpp">
<Filter>源文件\Task\Infrast</Filter>
</ClCompile>
<ClCompile Include="AipOcr.cpp">
<Filter>源文件\Requester</Filter>
</ClCompile>
<ClCompile Include="AbstractTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="StageDropsTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="DronesForShamareTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="BattleImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="HashImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer\General</Filter>
</ClCompile>
<ClCompile Include="RoguelikeFormationImageAnalyzer.cpp">
<Filter>源文件\ImageAnalyzer</Filter>
</ClCompile>
<ClCompile Include="RoguelikeBattleTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="RoguelikeFormationTask.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
<ClCompile Include="TilePack.cpp">
<Filter>源文件\Resource</Filter>
</ClCompile>
<ClCompile Include="ReplenishOriginiumShardTaskPlugin.cpp">
<Filter>源文件\TaskPlugin</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\resource\config.json">
<Filter>资源文件</Filter>
</None>
<None Include="..\..\resource\tasks.json">
<Filter>资源文件</Filter>
</None>
<None Include="..\..\resource\infrast.json">
<Filter>资源文件</Filter>
</None>
</ItemGroup>
</Project>

View File

@@ -64,14 +64,23 @@ bool asst::PenguinPack::load_json(const std::string& stage_path, const std::stri
stage_dst["drops"] = json::array(std::move(drops_vector));
stage_dst["existence"] = stage_info.at("existence").at(m_language).at("exist");
cvt_stage_json[std::move(key)] = std::move(stage_dst);
// 企鹅识别 4.2 新增的字段,为了区分第十章的 标准关卡 or 磨难关卡
json::value difficulty_json;
if (stage_dst["stageId"].as_string().find("tough_") == 0) {
difficulty_json["TOUGH"] = std::move(stage_dst);
}
else {
difficulty_json["NORMAL"] = std::move(stage_dst);
}
cvt_stage_json[std::move(key)] |= std::move(difficulty_json.as_object());
}
}
catch (json::exception& e) {
m_last_error = stage_path + " parsing error " + e.what();
return false;
}
::wload_stage_index(cvt_stage_json.to_string());
std::string cvt_string = cvt_stage_json.to_string();
::wload_stage_index(std::move(cvt_stage_json.to_string()));
::wload_hash_index(utils::load_file_without_bom(hash_path));
return true;

View File

@@ -87,9 +87,14 @@ bool ProcessTask::_run()
Rect rect;
std::shared_ptr<TaskInfo> cur_task_ptr = nullptr;
auto front_task_ptr = Task.get(m_cur_tasks_name.front());
// 可能有配置错误,导致不存在对应的任务
if (front_task_ptr == nullptr) {
Log.error("Invalid task", m_cur_tasks_name.front());
return false;
}
// 如果第一个任务是JustReturn的那就没必要再截图并计算了
if (auto front_task_ptr = Task.get(m_cur_tasks_name.front());
front_task_ptr->algorithm == AlgorithmType::JustReturn) {
if (front_task_ptr->algorithm == AlgorithmType::JustReturn) {
cur_task_ptr = front_task_ptr;
}
else {
@@ -123,7 +128,12 @@ bool ProcessTask::_run()
}
if (exec_times >= max_times) {
Log.info("exec times exceeds the limit", info.to_string());
info["details"] = json::object{
{ "task", cur_name },
{ "exec_times", exec_times },
{ "max_times", max_times }
};
Log.info("exec times exceeded the limit", info.to_string());
m_cur_tasks_name = cur_task_ptr->exceeded_next;
sleep(task_delay);
continue;
@@ -164,6 +174,10 @@ bool ProcessTask::_run()
case ProcessTaskAction::SwipeToTheRight:
exec_swipe_task(cur_task_ptr->action);
break;
case ProcessTaskAction::SlowlySwipeToTheLeft:
case ProcessTaskAction::SlowlySwipeToTheRight:
exec_slowly_swipe_task(cur_task_ptr->action);
break;
case ProcessTaskAction::DoNothing:
break;
case ProcessTaskAction::Stop:
@@ -237,3 +251,23 @@ void asst::ProcessTask::exec_swipe_task(ProcessTaskAction action)
break;
}
}
void asst::ProcessTask::exec_slowly_swipe_task(ProcessTaskAction action)
{
LogTraceFunction;
static Rect right_rect = Task.get("ProcessTaskSlowlySwipeRightRect")->specific_rect;
static Rect left_rect = Task.get("ProcessTaskSlowlySwipeLeftRect")->specific_rect;
static int duration = Task.get("ProcessTaskSlowlySwipeRightRect")->pre_delay;
static int extra_delay = Task.get("ProcessTaskSlowlySwipeRightRect")->rear_delay;
switch (action) {
case asst::ProcessTaskAction::SlowlySwipeToTheLeft:
Ctrler.swipe(left_rect, right_rect, duration, true, extra_delay, true);
break;
case asst::ProcessTaskAction::SlowlySwipeToTheRight:
Ctrler.swipe(right_rect, left_rect, duration, true, extra_delay, true);
break;
default: // 走不到这里TODO 报个错
break;
}
}

View File

@@ -26,6 +26,7 @@ namespace asst
void exec_click_task(const Rect& matched_rect);
void exec_swipe_task(ProcessTaskAction action);
void exec_slowly_swipe_task(ProcessTaskAction action);
std::vector<std::string> m_raw_tasks_name;
std::vector<std::string> m_cur_tasks_name;

View File

@@ -98,6 +98,11 @@ bool asst::ProcessTaskImageAnalyzer::analyze()
for (const std::string& task_name : m_tasks_name) {
auto task_ptr = Task.get(task_name);
// 可能有配置错误,导致不存在对应的任务
if (task_ptr == nullptr) {
Log.error("Invalid task", task_name);
continue;
}
switch (task_ptr->algorithm) {
case AlgorithmType::JustReturn:

View File

@@ -12,7 +12,7 @@
- 图像识别库:[opencv](https://github.com/opencv/opencv.git)
- ~~文字识别库:[chineseocr_lite](https://github.com/DayBreak-u/chineseocr_lite.git)~~
- 文字识别库:[PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)
- 关卡掉落识别:[企鹅物流识别](https://github.com/KumoSiunaus/penguin-stats-recognize-v3)
- 关卡掉落识别:[企鹅物流识别](https://github.com/penguin-statistics/recognizer)
- C++ JSON库[meojson](https://github.com/MistEO/meojson.git)
- C++ 运算符解析器:[calculator](https://github.com/kimwalisch/calculator)
- C++ base64编解码[cpp-base64](https://github.com/ReneNyffenegger/cpp-base64)

View File

@@ -0,0 +1,25 @@
#include "ReplenishOriginiumShardTaskPlugin.h"
#include "ProcessTask.h"
bool asst::ReplenishOriginiumShardTaskPlugin::verify(AsstMsg msg, const json::value& details) const
{
if (msg != AsstMsg::SubTaskExtraInfo
|| details.get("subtask", std::string()) != "InfrastMfgTask") {
return false;
}
if (details.at("what").as_string() == "ProductOfFacility"
&& details.at("details").at("product").as_string() == "OriginStone") {
return true;
}
else {
return false;
}
}
bool asst::ReplenishOriginiumShardTaskPlugin::_run()
{
ProcessTask task(*this, { "ReplenishToMax" });
return task.run();
}

View File

@@ -0,0 +1,18 @@
#pragma once
#include "AbstractTaskPlugin.h"
namespace asst
{
// 制造站“源石碎片”自动补货任务插件
class ReplenishOriginiumShardTaskPlugin : public AbstractTaskPlugin
{
public:
using AbstractTaskPlugin::AbstractTaskPlugin;
virtual ~ReplenishOriginiumShardTaskPlugin() = default;
virtual bool verify(AsstMsg msg, const json::value& details) const override;
private:
virtual bool _run() override;
};
}

View File

@@ -55,12 +55,13 @@ bool asst::StageDropsTaskPlugin::_run()
drop_info_callback();
check_stage_valid();
auto upload_future = std::async(
std::launch::async,
std::bind(&StageDropsTaskPlugin::upload_to_penguin, this));
m_upload_pending.emplace_back(std::move(upload_future));
if (m_enable_penguid) {
auto upload_future = std::async(
std::launch::async,
std::bind(&StageDropsTaskPlugin::upload_to_penguin, this));
m_upload_pending.emplace_back(std::move(upload_future));
}
return true;
}
@@ -72,7 +73,7 @@ bool asst::StageDropsTaskPlugin::recognize_drops()
if (need_exit()) {
return false;
}
cv::Mat image = Ctrler.get_image();
cv::Mat image = Ctrler.get_image(true);
std::string res = Resrc.penguin().recognize(image);
Log.trace("Results of penguin recognition:\n", res);
m_cur_drops = json::parse(res).value();

View File

@@ -34,5 +34,6 @@ namespace asst
bool m_startbutton_delay_setted = false;
std::vector<std::future<void>> m_upload_pending;
ProcessTask* m_cast_ptr = nullptr;
bool m_enable_penguid = true;
};
}

View File

@@ -10,211 +10,217 @@
const std::shared_ptr<asst::TaskInfo> asst::TaskData::get(const std::string& name) const noexcept
{
if (auto iter = m_all_tasks_info.find(name);
iter != m_all_tasks_info.cend()) {
return iter->second;
}
else {
return nullptr;
}
if (auto iter = m_all_tasks_info.find(name);
iter != m_all_tasks_info.cend()) {
return iter->second;
}
else {
return nullptr;
}
}
const std::unordered_set<std::string>& asst::TaskData::get_templ_required() const noexcept
{
return m_templ_required;
return m_templ_required;
}
std::shared_ptr<asst::TaskInfo> asst::TaskData::get(std::string name)
{
return m_all_tasks_info[std::move(name)];
return m_all_tasks_info[std::move(name)];
}
void asst::TaskData::clear_cache() noexcept
{
for (auto&& [name, ptr] : m_all_tasks_info) {
ptr->region_of_appeared = Rect();
}
for (auto&& [name, ptr] : m_all_tasks_info) {
ptr->region_of_appeared = Rect();
}
}
bool asst::TaskData::parse(const json::value& json)
{
auto to_lower = [](char c) -> char {
return (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c;
};
for (const auto& [name, task_json] : json.as_object()) {
std::string algorithm_str = task_json.get("algorithm", "matchtemplate");
std::transform(algorithm_str.begin(), algorithm_str.end(), algorithm_str.begin(), to_lower);
AlgorithmType algorithm = AlgorithmType::Invalid;
if (algorithm_str == "matchtemplate") {
algorithm = AlgorithmType::MatchTemplate;
}
else if (algorithm_str == "justreturn") {
algorithm = AlgorithmType::JustReturn;
}
else if (algorithm_str == "ocrdetect") {
algorithm = AlgorithmType::OcrDetect;
}
else if (algorithm_str == "hash") {
algorithm = AlgorithmType::Hash;
}
else {
m_last_error = "algorithm error " + algorithm_str;
return false;
}
auto to_lower = [](char c) -> char {
return (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c;
};
for (const auto& [name, task_json] : json.as_object()) {
std::string algorithm_str = task_json.get("algorithm", "matchtemplate");
std::transform(algorithm_str.begin(), algorithm_str.end(), algorithm_str.begin(), to_lower);
AlgorithmType algorithm = AlgorithmType::Invalid;
if (algorithm_str == "matchtemplate") {
algorithm = AlgorithmType::MatchTemplate;
}
else if (algorithm_str == "justreturn") {
algorithm = AlgorithmType::JustReturn;
}
else if (algorithm_str == "ocrdetect") {
algorithm = AlgorithmType::OcrDetect;
}
else if (algorithm_str == "hash") {
algorithm = AlgorithmType::Hash;
}
else {
m_last_error = "algorithm error " + algorithm_str;
return false;
}
std::shared_ptr<TaskInfo> task_info_ptr = nullptr;
switch (algorithm) {
case AlgorithmType::JustReturn:
task_info_ptr = std::make_shared<TaskInfo>();
break;
case AlgorithmType::MatchTemplate: {
auto match_task_info_ptr = std::make_shared<MatchTaskInfo>();
match_task_info_ptr->templ_name = task_json.get("template", name + ".png");
m_templ_required.emplace(match_task_info_ptr->templ_name);
std::shared_ptr<TaskInfo> task_info_ptr = nullptr;
switch (algorithm) {
case AlgorithmType::JustReturn:
task_info_ptr = std::make_shared<TaskInfo>();
break;
case AlgorithmType::MatchTemplate: {
auto match_task_info_ptr = std::make_shared<MatchTaskInfo>();
match_task_info_ptr->templ_name = task_json.get("template", name + ".png");
m_templ_required.emplace(match_task_info_ptr->templ_name);
match_task_info_ptr->templ_threshold = task_json.get(
"templThreshold", TemplThresholdDefault);
match_task_info_ptr->special_threshold = task_json.get(
"specialThreshold", 0);
if (task_json.contains("maskRange")) {
match_task_info_ptr->mask_range = std::make_pair(
task_json.at("maskRange")[0].as_integer(),
task_json.at("maskRange")[1].as_integer());
}
match_task_info_ptr->templ_threshold = task_json.get(
"templThreshold", TemplThresholdDefault);
match_task_info_ptr->special_threshold = task_json.get(
"specialThreshold", 0);
if (task_json.contains("maskRange")) {
match_task_info_ptr->mask_range = std::make_pair(
task_json.at("maskRange")[0].as_integer(),
task_json.at("maskRange")[1].as_integer());
}
task_info_ptr = match_task_info_ptr;
} break;
case AlgorithmType::OcrDetect: {
auto ocr_task_info_ptr = std::make_shared<OcrTaskInfo>();
for (const json::value& text : task_json.at("text").as_array()) {
ocr_task_info_ptr->text.emplace_back(text.as_string());
}
ocr_task_info_ptr->need_full_match = task_json.get("need_match", false);
if (task_json.contains("ocrReplace")) {
for (const json::value& rep : task_json.at("ocrReplace").as_array()) {
ocr_task_info_ptr->replace_map.emplace(rep.as_array()[0].as_string(), rep.as_array()[1].as_string());
}
}
task_info_ptr = ocr_task_info_ptr;
} break;
case AlgorithmType::Hash:
{
auto hash_task_info_ptr = std::make_shared<HashTaskInfo>();
for (const json::value& hash : task_json.at("hash").as_array()) {
hash_task_info_ptr->hashs.emplace_back(hash.as_string());
}
hash_task_info_ptr->dist_threshold = task_json.get("threshold", 0);
if (task_json.contains("maskRange")) {
hash_task_info_ptr->mask_range = std::make_pair(
task_json.at("maskRange")[0].as_integer(),
task_json.at("maskRange")[1].as_integer());
}
hash_task_info_ptr->bound = task_json.get("bound", true);
task_info_ptr = match_task_info_ptr;
} break;
case AlgorithmType::OcrDetect: {
auto ocr_task_info_ptr = std::make_shared<OcrTaskInfo>();
for (const json::value& text : task_json.at("text").as_array()) {
ocr_task_info_ptr->text.emplace_back(text.as_string());
}
ocr_task_info_ptr->need_full_match = task_json.get("need_match", false);
if (task_json.contains("ocrReplace")) {
for (const json::value& rep : task_json.at("ocrReplace").as_array()) {
ocr_task_info_ptr->replace_map.emplace(rep.as_array()[0].as_string(), rep.as_array()[1].as_string());
}
}
task_info_ptr = ocr_task_info_ptr;
} break;
case AlgorithmType::Hash:
{
auto hash_task_info_ptr = std::make_shared<HashTaskInfo>();
for (const json::value& hash : task_json.at("hash").as_array()) {
hash_task_info_ptr->hashs.emplace_back(hash.as_string());
}
hash_task_info_ptr->dist_threshold = task_json.get("threshold", 0);
if (task_json.contains("maskRange")) {
hash_task_info_ptr->mask_range = std::make_pair(
task_json.at("maskRange")[0].as_integer(),
task_json.at("maskRange")[1].as_integer());
}
hash_task_info_ptr->bound = task_json.get("bound", true);
task_info_ptr = hash_task_info_ptr;
} break;
}
task_info_ptr->cache = task_json.get("cache", true);
task_info_ptr->algorithm = algorithm;
task_info_ptr->name = name;
std::string action = task_json.get("action", std::string());
std::transform(action.begin(), action.end(), action.begin(), to_lower);
if (action == "clickself") {
task_info_ptr->action = ProcessTaskAction::ClickSelf;
}
else if (action == "clickrand") {
task_info_ptr->action = ProcessTaskAction::ClickRand;
}
else if (action == "donothing" || action.empty()) {
task_info_ptr->action = ProcessTaskAction::DoNothing;
}
else if (action == "stop") {
task_info_ptr->action = ProcessTaskAction::Stop;
}
else if (action == "clickrect") {
task_info_ptr->action = ProcessTaskAction::ClickRect;
const json::value& rect_json = task_json.at("specificRect");
task_info_ptr->specific_rect = Rect(
rect_json[0].as_integer(),
rect_json[1].as_integer(),
rect_json[2].as_integer(),
rect_json[3].as_integer());
}
else if (action == "swipetotheleft") {
task_info_ptr->action = ProcessTaskAction::SwipeToTheLeft;
}
else if (action == "swipetotheright") {
task_info_ptr->action = ProcessTaskAction::SwipeToTheRight;
}
else {
m_last_error = "Task: " + name + " error: " + action;
return false;
}
task_info_ptr = hash_task_info_ptr;
} break;
}
task_info_ptr->cache = task_json.get("cache", true);
task_info_ptr->algorithm = algorithm;
task_info_ptr->name = name;
std::string action = task_json.get("action", std::string());
std::transform(action.begin(), action.end(), action.begin(), to_lower);
if (action == "clickself") {
task_info_ptr->action = ProcessTaskAction::ClickSelf;
}
else if (action == "clickrand") {
task_info_ptr->action = ProcessTaskAction::ClickRand;
}
else if (action == "donothing" || action.empty()) {
task_info_ptr->action = ProcessTaskAction::DoNothing;
}
else if (action == "stop") {
task_info_ptr->action = ProcessTaskAction::Stop;
}
else if (action == "clickrect") {
task_info_ptr->action = ProcessTaskAction::ClickRect;
const json::value& rect_json = task_json.at("specificRect");
task_info_ptr->specific_rect = Rect(
rect_json[0].as_integer(),
rect_json[1].as_integer(),
rect_json[2].as_integer(),
rect_json[3].as_integer());
}
else if (action == "swipetotheleft") {
task_info_ptr->action = ProcessTaskAction::SwipeToTheLeft;
}
else if (action == "swipetotheright") {
task_info_ptr->action = ProcessTaskAction::SwipeToTheRight;
}
else if (action == "slowlyswipetotheleft") {
task_info_ptr->action = ProcessTaskAction::SlowlySwipeToTheLeft;
}
else if (action == "slowlyswipetotheright") {
task_info_ptr->action = ProcessTaskAction::SlowlySwipeToTheRight;
}
else {
m_last_error = "Task: " + name + " error: " + action;
return false;
}
task_info_ptr->max_times = task_json.get("maxTimes", INT_MAX);
if (task_json.contains("exceededNext")) {
const json::array& excceed_next_arr = task_json.at("exceededNext").as_array();
for (const json::value& excceed_next : excceed_next_arr) {
task_info_ptr->exceeded_next.emplace_back(excceed_next.as_string());
}
}
else {
task_info_ptr->exceeded_next.emplace_back("Stop");
}
task_info_ptr->pre_delay = task_json.get("preDelay", 0);
task_info_ptr->rear_delay = task_json.get("rearDelay", 0);
if (task_json.contains("reduceOtherTimes")) {
const json::array& reduce_arr = task_json.at("reduceOtherTimes").as_array();
for (const json::value& reduce : reduce_arr) {
task_info_ptr->reduce_other_times.emplace_back(reduce.as_string());
}
}
if (task_json.contains("roi")) {
const json::array& area_arr = task_json.at("roi").as_array();
int x = area_arr[0].as_integer();
int y = area_arr[1].as_integer();
int width = area_arr[2].as_integer();
int height = area_arr[3].as_integer();
task_info_ptr->max_times = task_json.get("maxTimes", INT_MAX);
if (task_json.contains("exceededNext")) {
const json::array& excceed_next_arr = task_json.at("exceededNext").as_array();
for (const json::value& excceed_next : excceed_next_arr) {
task_info_ptr->exceeded_next.emplace_back(excceed_next.as_string());
}
}
else {
task_info_ptr->exceeded_next.emplace_back("Stop");
}
task_info_ptr->pre_delay = task_json.get("preDelay", 0);
task_info_ptr->rear_delay = task_json.get("rearDelay", 0);
if (task_json.contains("reduceOtherTimes")) {
const json::array& reduce_arr = task_json.at("reduceOtherTimes").as_array();
for (const json::value& reduce : reduce_arr) {
task_info_ptr->reduce_other_times.emplace_back(reduce.as_string());
}
}
if (task_json.contains("roi")) {
const json::array& area_arr = task_json.at("roi").as_array();
int x = area_arr[0].as_integer();
int y = area_arr[1].as_integer();
int width = area_arr[2].as_integer();
int height = area_arr[3].as_integer();
#ifdef ASST_DEBUG
if (x + width > WindowWidthDefault || y + height > WindowHeightDefault) {
m_last_error = name + " roi is out of bounds";
return false;
}
if (x + width > WindowWidthDefault || y + height > WindowHeightDefault) {
m_last_error = name + " roi is out of bounds";
return false;
}
#endif
task_info_ptr->roi = Rect(x, y, width, height);
}
else {
task_info_ptr->roi = Rect();
}
task_info_ptr->roi = Rect(x, y, width, height);
}
else {
task_info_ptr->roi = Rect();
}
if (task_json.contains("next")) {
for (const json::value& next : task_json.at("next").as_array()) {
task_info_ptr->next.emplace_back(next.as_string());
}
}
if (task_json.contains("rectMove")) {
const json::array& move_arr = task_json.at("rectMove").as_array();
task_info_ptr->rect_move = Rect(
move_arr[0].as_integer(),
move_arr[1].as_integer(),
move_arr[2].as_integer(),
move_arr[3].as_integer());
}
else {
task_info_ptr->rect_move = Rect();
}
if (task_json.contains("next")) {
for (const json::value& next : task_json.at("next").as_array()) {
task_info_ptr->next.emplace_back(next.as_string());
}
}
if (task_json.contains("rectMove")) {
const json::array& move_arr = task_json.at("rectMove").as_array();
task_info_ptr->rect_move = Rect(
move_arr[0].as_integer(),
move_arr[1].as_integer(),
move_arr[2].as_integer(),
move_arr[3].as_integer());
}
else {
task_info_ptr->rect_move = Rect();
}
m_all_tasks_info.emplace(name, task_info_ptr);
}
m_all_tasks_info.emplace(name, task_info_ptr);
}
#ifdef ASST_DEBUG
for (const auto& [name, task] : m_all_tasks_info) {
for (const auto& next : task->next) {
if (m_all_tasks_info.find(next) == m_all_tasks_info.cend()) {
m_last_error = name + "'s next " + next + " is null";
return false;
}
}
}
for (const auto& [name, task] : m_all_tasks_info) {
for (const auto& next : task->next) {
if (m_all_tasks_info.find(next) == m_all_tasks_info.cend()) {
m_last_error = name + "'s next " + next + " is null";
return false;
}
}
}
#endif
return true;
}
return true;
}

View File

@@ -2,5 +2,5 @@
namespace asst
{
constexpr static const char* Version = "v3.2";
constexpr static const char* Version = "v3.3";
}

View File

@@ -274,6 +274,10 @@ namespace MeoAsstGui
mainModel.AddLog("已碎石 " + execTimes + " 颗", "darkcyan");
break;
case "AbandonAction":
mainModel.AddLog("代理指挥失误", "darkred");
break;
case "RecruitRefreshConfirm":
mainModel.AddLog("已刷新标签", "darkcyan");
break;

View File

@@ -75,7 +75,8 @@ namespace MeoAsstGui
new CombData { Display = "红票-5", Value = "AP-5" },
new CombData { Display = "经验-5", Value = "LS-5" },
new CombData { Display = "经验-6", Value = "LS-6" },
new CombData { Display = "技能-5", Value = "CA-5" }
new CombData { Display = "技能-5", Value = "CA-5" },
new CombData { Display = "1-7", Value = "1-7" }
};
// “风雪过境” 活动关卡
//StageList.Add(new CombData { Display = "BI-7", Value = "BI-7" });