mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
Merge pull request #4225 from godric3/map-editor-town-configuration-improvements
Map editor town configuration improvements (buildings, spells, events)
This commit is contained in:
@@ -1221,6 +1221,12 @@ void CGTownInstance::serializeJsonOptions(JsonSerializeFormat & handler)
|
||||
handler.serializeIdArray( "possibleSpells", possibleSpells);
|
||||
handler.serializeIdArray( "obligatorySpells", obligatorySpells);
|
||||
}
|
||||
|
||||
{
|
||||
auto eventsHandler = handler.enterArray("events");
|
||||
eventsHandler.syncSize(events, JsonNode::JsonType::DATA_VECTOR);
|
||||
eventsHandler.serializeStruct(events);
|
||||
}
|
||||
}
|
||||
|
||||
FactionID CGTownInstance::getFaction() const
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
std::vector<CGTownBuilding*> bonusingBuildings;
|
||||
std::vector<SpellID> possibleSpells, obligatorySpells;
|
||||
std::vector<std::vector<SpellID> > spells; //spells[level] -> vector of spells, first will be available in guild
|
||||
std::list<CCastleEvent> events;
|
||||
std::vector<CCastleEvent> events;
|
||||
std::pair<si32, si32> bonusValue;//var to store town bonuses (rampart = resources from mystic pond);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user