mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-27 00:41:08 +02:00
Support roads and teams customization in engine
This commit is contained in:
@ -22,6 +22,9 @@ VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
void RoadPlacer::process()
|
||||
{
|
||||
if(generator.getConfig().defaultRoadType.empty() && generator.getConfig().secondaryRoadType.empty())
|
||||
return; //do not generate roads at all
|
||||
|
||||
connectRoads();
|
||||
}
|
||||
|
||||
@ -68,6 +71,10 @@ bool RoadPlacer::createRoad(const int3 & dst)
|
||||
|
||||
void RoadPlacer::drawRoads(bool secondary)
|
||||
{
|
||||
if((secondary && generator.getConfig().secondaryRoadType.empty())
|
||||
|| (!secondary && generator.getConfig().defaultRoadType.empty()))
|
||||
return;
|
||||
|
||||
zone.areaPossible().subtract(roads);
|
||||
zone.freePaths().unite(roads);
|
||||
map.getEditManager()->getTerrainSelection().setSelection(roads.getTilesVector());
|
||||
|
Reference in New Issue
Block a user