feat: add en_US

This commit is contained in:
Tsubasa6848
2024-02-28 06:29:43 +08:00
Unverified
parent d201563742
commit 62a75f8a94
3 changed files with 52 additions and 3 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ GMLIB::Files::JsonConfig* Config = nullptr;
GMLIB::Files::I18n::LangI18n* Language = nullptr;
nlohmann::json mPlayerDataCache;
std::optional<std::string> readFile(std::string path) {
std::optional<nlohmann::json> readFile(std::string path) {
if (std::filesystem::exists(path)) {
return GMLIB::Files::JsonFile::readFromFile(path);
}
@@ -18,7 +18,7 @@ void initPlayerDataCache() {
auto data = readFile("./plugins/InventoryCheck/data/PlayerDataCache.json");
if (data.has_value()) {
try {
mPlayerDataCache = nlohmann::json::parse(data.value());
mPlayerDataCache = data.value();
} catch (...) {}
}
}