refactor.读取资源接口解耦

This commit is contained in:
MistEO
2022-03-04 23:51:08 +08:00
parent b68fa59076
commit 1fdb131f7b
19 changed files with 334 additions and 285 deletions

View File

@@ -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;
}
}