mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Merge remote-tracking branch 'origin/develop' into custom_objects_per_zone
# Conflicts: # lib/rmg/CRmgTemplate.cpp
This commit is contained in:
@@ -482,7 +482,8 @@ void ZoneConnection::serializeJson(JsonSerializeFormat & handler)
|
||||
"guarded",
|
||||
"fictive",
|
||||
"repulsive",
|
||||
"wide"
|
||||
"wide",
|
||||
"forcePortal"
|
||||
};
|
||||
|
||||
static const std::vector<std::string> roadOptions =
|
||||
@@ -519,9 +520,12 @@ void ZoneConnection::serializeJson(JsonSerializeFormat & handler)
|
||||
|
||||
using namespace rmg;//todo: remove
|
||||
|
||||
CRmgTemplate::~CRmgTemplate() = default;
|
||||
|
||||
CRmgTemplate::CRmgTemplate()
|
||||
: minSize(72, 72, 2),
|
||||
maxSize(72, 72, 2)
|
||||
maxSize(72, 72, 2),
|
||||
mapSettings(std::make_unique<JsonNode>())
|
||||
{
|
||||
|
||||
}
|
||||
@@ -712,6 +716,8 @@ void CRmgTemplate::serializeJson(JsonSerializeFormat & handler)
|
||||
serializePlayers(handler, players, "players");
|
||||
serializePlayers(handler, humanPlayers, "humans"); // TODO: Rename this parameter
|
||||
|
||||
*mapSettings = handler.getCurrent()["settings"];
|
||||
|
||||
{
|
||||
auto connectionsData = handler.enterArray("connections");
|
||||
connectionsData.serializeStruct(connectedZoneIds);
|
||||
@@ -767,6 +773,11 @@ void CRmgTemplate::serializeJson(JsonSerializeFormat & handler)
|
||||
}
|
||||
}
|
||||
|
||||
const JsonNode & CRmgTemplate::getMapSettings() const
|
||||
{
|
||||
return *mapSettings;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T CRmgTemplate::inheritZoneProperty(std::shared_ptr<rmg::ZoneOptions> zone,
|
||||
T (rmg::ZoneOptions::*getter)() const,
|
||||
|
||||
Reference in New Issue
Block a user