mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
refactor.读取资源接口解耦
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
#include <meojson/json.hpp>
|
||||
|
||||
#include "Logger.hpp"
|
||||
|
||||
bool asst::ItemConfiger::parse(const json::value& json)
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
for (const auto& [id, item_json] : json.as_object()) {
|
||||
std::string name = item_json.at("name_i18n").at("zh").as_string();
|
||||
m_item_name.emplace(id, std::move(name));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user