Fix oil generation in sea.

This commit is contained in:
Duan Tao 2020-06-19 18:41:02 +08:00 committed by Yair Morgenstern
parent 3150c1783c
commit b2d0a10f0e

View file

@ -126,7 +126,7 @@ class MapGenerator(val ruleset: Ruleset) {
private fun spreadStrategicResources(tileMap: TileMap, distance: Int) {
val strategicResources = ruleset.tileResources.values.filter { it.resourceType == ResourceType.Strategic }
// passable land tiles (no mountains, no wonders) without resources yet
val candidateTiles = tileMap.values.filter { it.resource == null && it.isLand && !it.getLastTerrain().impassable }
val candidateTiles = tileMap.values.filter { it.resource == null && !it.getLastTerrain().impassable }
val totalNumberOfResources = candidateTiles.size * tileMap.mapParameters.resourceRichness
val resourcesPerType = (totalNumberOfResources/strategicResources.size).toInt()
for (resource in strategicResources) {