mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 19:43:13 -04:00
Map editor generation steps don't add multiple terrain features of the same type
This commit is contained in:
parent
fbef276d0b
commit
0b89e609c7
@ -838,8 +838,10 @@ open class Tile : IsPartOfGameInfoSerialization {
|
||||
}
|
||||
}
|
||||
|
||||
fun addTerrainFeature(terrainFeature: String) =
|
||||
setTerrainFeatures(ArrayList(terrainFeatures).apply { add(terrainFeature) })
|
||||
fun addTerrainFeature(terrainFeature: String) {
|
||||
if (!terrainFeatures.contains(terrainFeature))
|
||||
setTerrainFeatures(ArrayList(terrainFeatures).apply { add(terrainFeature) })
|
||||
}
|
||||
|
||||
fun removeTerrainFeature(terrainFeature: String) =
|
||||
setTerrainFeatures(ArrayList(terrainFeatures).apply { remove(terrainFeature) })
|
||||
|
Loading…
x
Reference in New Issue
Block a user