Implemented crude support for custom encodings via thingy files

Relevant issue: #26
This commit is contained in:
WerWolv
2021-02-14 01:11:55 +01:00
parent 424bba71f7
commit b4c2f7d371
9 changed files with 277 additions and 15 deletions

View File

@@ -30,8 +30,6 @@ namespace hex {
json[unlocalizedCategory.data()] = nlohmann::json::object();
if (!json[unlocalizedCategory.data()].contains(unlocalizedName.data()))
json[unlocalizedCategory.data()][unlocalizedName.data()] = defaultValue;
Settings::store();
}
void ContentRegistry::Settings::add(std::string_view unlocalizedCategory, std::string_view unlocalizedName, std::string_view defaultValue, const std::function<bool(std::string_view, nlohmann::json&)> &callback) {
@@ -43,8 +41,6 @@ namespace hex {
json[unlocalizedCategory.data()] = nlohmann::json::object();
if (!json[unlocalizedCategory.data()].contains(unlocalizedName.data()))
json[unlocalizedCategory.data()][unlocalizedName.data()] = defaultValue;
Settings::store();
}
void ContentRegistry::Settings::write(std::string_view unlocalizedCategory, std::string_view unlocalizedName, s64 value) {