mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
CGResource serialization
This commit is contained in:
parent
d8d574ed84
commit
97f19b5176
@ -941,15 +941,18 @@ void CGResource::blockingDialogAnswered(const CGHeroInstance *hero, ui32 answer)
|
||||
|
||||
void CGResource::writeJsonOptions(JsonNode& json) const
|
||||
{
|
||||
|
||||
CCreatureSet::writeJson(json["guards"]);
|
||||
json["amount"].Float() = amount;
|
||||
json["guardMessage"].String() = message;
|
||||
}
|
||||
|
||||
void CGResource::readJsonOptions(const JsonNode& json)
|
||||
{
|
||||
|
||||
CCreatureSet::readJson(json["guards"]);
|
||||
amount = json["amount"].Float();
|
||||
message = json["guardMessage"].String();
|
||||
}
|
||||
|
||||
|
||||
CGTeleport::CGTeleport() :
|
||||
type(UNKNOWN), channel(TeleportChannelID())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user