1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

extend map format

This commit is contained in:
Laserlicht
2024-06-29 13:13:59 +02:00
parent 8444f7b330
commit 02bd52041b
14 changed files with 151 additions and 10 deletions

View File

@ -311,6 +311,10 @@ void CMapFormatJson::serializeHeader(JsonSerializeFormat & handler)
{
handler.serializeStruct("name", mapHeader->name);
handler.serializeStruct("description", mapHeader->description);
handler.serializeStruct("author", mapHeader->author);
handler.serializeStruct("authorContact", mapHeader->authorContact);
handler.serializeStruct("mapVersion", mapHeader->mapVersion);
handler.serializeInt("creationDateTime", mapHeader->creationDateTime, 0);
handler.serializeInt("heroLevelLimit", mapHeader->levelLimit, 0);
//todo: support arbitrary percentage
@ -855,7 +859,6 @@ void CMapLoaderJson::readHeader(const bool complete)
//todo: multilevel map load support
{
auto levels = handler.enterStruct("mapLevels");
{
auto surface = handler.enterStruct("surface");
handler.serializeInt("height", mapHeader->height);