1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

ObjectTemplate serialization

(+) generated map displayed correctly in editor
This commit is contained in:
AlexVinS
2015-11-14 23:57:22 +03:00
parent 2d777ea676
commit 8a979d016f
3 changed files with 94 additions and 10 deletions

View File

@@ -335,7 +335,7 @@ void CGObjectInstance::writeJson(JsonNode & json, bool withState) const
json["y"].Float() = pos.y;
json["l"].Float() = pos.z;
appearance.writeJson(json["template"]);
appearance.writeJson(json["template"], false);
writeJsonOptions(json["options"]);
if(withState)
writeJsonState(json["state"]);
@@ -352,7 +352,7 @@ void CGObjectInstance::readJson(const JsonNode & json, bool withState)
pos.y = json["y"].Float();
pos.z = json["l"].Float();
appearance.readJson(json["template"]);
appearance.readJson(json["template"], false);
readJsonOptions(json["options"]);
if(withState)
readJsonState(json["state"]);