1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

fix mines serializer

This commit is contained in:
Laserlicht
2025-10-01 00:46:40 +02:00
parent 57a49838ec
commit c72a4b0294

View File

@@ -346,13 +346,10 @@ public:
}
else
{
const JsonNode & node = getCurrent()[fieldName];
for (const auto & [keyStr, jsonVal] : node.Struct())
for (const auto & [keyStr, jsonVal] : getCurrent()[fieldName].Struct())
{
Key key = Key::decode(keyStr);
LIBRARY->identifiers()->requestIdentifier(jsonVal.getModScope(), Key::entityType(), keyStr, [&value, key](int32_t index) {
value[key] = T(index);
LIBRARY->identifiers()->requestIdentifier(jsonVal.getModScope(), Key::entityType(), keyStr, [&value, jsonVal](int32_t index) {
value[Key(index)] = jsonVal.Integer(); // TODO: only int supported yet
});
}
}