Moved hardcoded terrain palette-cycling animations to config

This commit is contained in:
Ivan Savenko committed 2023-07-05 22:07:20 +03:00
1 parent 4911cf0bd4
commit 3bce245780
10 files changed
+147 -66

No files matched your search

+9
View File
@@ -73,6 +73,15 @@ TerrainType * TerrainTypeHandler::loadFromJson( const std::string & scope, const
});
}
for(const auto & t : json["paletteAnimation"].Vector())
{
TerrainPaletteAnimation element{
static_cast<int>(t["start"].Integer()),
static_cast<int>(t["length"].Integer())
};
info->paletteAnimation.push_back(element);
}
info->shortIdentifier = json["shortIdentifier"].String();
assert(info->shortIdentifier.length() == 2);