100 for (
const std::pair<std::string, S>& pair : json[
"structures"].get<std::unordered_map<std::string, S>>())
101 structures[std::stoi(pair.first)] = pair.second;
104 if (json.contains(
"state")) setState<int>(json[
"state"].get<int>());
107 if (json.contains(
"animation")) {
113 std::transform(type.begin(), type.end(), type.begin(), [](
char c) ->
char { return std::tolower(c); });
116 std::vector<std::pair<int, float>> stages;
117 std::vector<JSON> stagesJson =
animationInfo[
"stages"].get<std::vector<JSON>>();
118 for (
const JSON& json : stagesJson) stages.push_back(std::make_pair(json[
"state"].get<
int>(), json[
"duration"].get<
float>()));