mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-21 12:06:49 +02:00
Fix missing template zIndex saving
This commit is contained in:
parent
4a37ed99ea
commit
0de1a37d65
@ -252,11 +252,7 @@ void ObjectTemplate::readJson(const JsonNode &node, const bool withTerrain)
|
|||||||
usedTiles[mask.size() - 1 - i][line.size() - 1 - j] = charToTile(line[j]);
|
usedTiles[mask.size() - 1 - i][line.size() - 1 - j] = charToTile(line[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const JsonNode zindex = node["zIndex"];
|
printPriority = node["zIndex"].Float();
|
||||||
if (!zindex.isNull())
|
|
||||||
printPriority = node["zIndex"].Float();
|
|
||||||
else
|
|
||||||
printPriority = 0; //default value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectTemplate::writeJson(JsonNode & node, const bool withTerrain) const
|
void ObjectTemplate::writeJson(JsonNode & node, const bool withTerrain) const
|
||||||
@ -344,6 +340,9 @@ void ObjectTemplate::writeJson(JsonNode & node, const bool withTerrain) const
|
|||||||
line[j] = tileToChar(usedTiles[height - 1 - i][width - 1 - j]);
|
line[j] = tileToChar(usedTiles[height - 1 - i][width - 1 - j]);
|
||||||
mask.push_back(lineNode);
|
mask.push_back(lineNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(printPriority != 0)
|
||||||
|
node["zIndex"].Float() = printPriority;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui32 ObjectTemplate::getWidth() const
|
ui32 ObjectTemplate::getWidth() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user