mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Load obstacle sets from json in mods
This commit is contained in:
@@ -177,7 +177,10 @@ bool ObstacleProxy::prepareBiome(TerrainId terrain, CRandomGenerator & rand)
|
||||
|
||||
// Copy this set to our possible obstacles
|
||||
|
||||
if (selectedSets >= MINIMUM_SETS)
|
||||
// if (selectedSets >= MINIMUM_SETS)
|
||||
|
||||
if (selectedSets >= MINIMUM_SETS ||
|
||||
(terrain == TerrainId::WATER && selectedSets > 0))
|
||||
{
|
||||
obstaclesBySize.clear();
|
||||
for (const auto & os : obstacleSets)
|
||||
@@ -200,7 +203,7 @@ bool ObstacleProxy::prepareBiome(TerrainId terrain, CRandomGenerator & rand)
|
||||
{
|
||||
return p1.first > p2.first; //bigger obstacles first
|
||||
});
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user