mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
show "rough terrain" property in Civilopedia
This commit is contained in:
parent
0e1a7f44c4
commit
c8c3370cb9
@ -59,7 +59,8 @@
|
|||||||
production:2,
|
production:2,
|
||||||
movementCost:2,
|
movementCost:2,
|
||||||
defenceBonus: 0.25,
|
defenceBonus: 0.25,
|
||||||
RGB: [74,81,40]
|
RGB: [74,81,40],
|
||||||
|
rough: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Mountain",
|
name:"Mountain",
|
||||||
@ -87,7 +88,8 @@
|
|||||||
overrideStats:true,
|
overrideStats:true,
|
||||||
unbuildable:true,
|
unbuildable:true,
|
||||||
defenceBonus: 0.25,
|
defenceBonus: 0.25,
|
||||||
occursOn:["Tundra","Plains","Grassland","Hill"]
|
occursOn:["Tundra","Plains","Grassland","Hill"],
|
||||||
|
rough: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Jungle",
|
name:"Jungle",
|
||||||
@ -97,7 +99,8 @@
|
|||||||
overrideStats:true,
|
overrideStats:true,
|
||||||
unbuildable:true,
|
unbuildable:true,
|
||||||
defenceBonus: 0.25,
|
defenceBonus: 0.25,
|
||||||
occursOn:["Plains","Grassland"]
|
occursOn:["Plains","Grassland"],
|
||||||
|
rough: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Marsh",
|
name:"Marsh",
|
||||||
|
@ -3310,6 +3310,10 @@
|
|||||||
Portuguese:"Custo de movimento"
|
Portuguese:"Custo de movimento"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"Rough Terrain":{
|
||||||
|
German: "Unwegsames Gelände"
|
||||||
|
}
|
||||||
|
|
||||||
" for ":{ //for example:+1 Gold for Gems,Gold,Silver
|
" for ":{ //for example:+1 Gold for Gems,Gold,Silver
|
||||||
Italian:" per "
|
Italian:" per "
|
||||||
Simplified_Chinese:",当建造在拥有下列资源的地块上时:"
|
Simplified_Chinese:",当建造在拥有下列资源的地块上时:"
|
||||||
|
@ -243,7 +243,7 @@ open class TileInfo {
|
|||||||
return listOf(abs(xDelta),abs(yDelta), abs(xDelta-yDelta)).max()!!.toInt()
|
return listOf(abs(xDelta),abs(yDelta), abs(xDelta-yDelta)).max()!!.toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isRoughTerrain() = baseTerrain == Constants.hill || terrainFeature == Constants.forest || terrainFeature == Constants.jungle
|
fun isRoughTerrain() = getBaseTerrain().rough || getTerrainFeature()?.rough == true
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
val lineList = ArrayList<String>() // more readable than StringBuilder, with same performance for our use-case
|
val lineList = ArrayList<String>() // more readable than StringBuilder, with same performance for our use-case
|
||||||
|
@ -33,6 +33,9 @@ class Terrain : NamedStats(), ICivilopedia {
|
|||||||
sb.appendln("{Defence bonus}: ".tr()+(defenceBonus*100).toInt()+"%")
|
sb.appendln("{Defence bonus}: ".tr()+(defenceBonus*100).toInt()+"%")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(rough)
|
||||||
|
sb.appendln("Rough Terrain".tr())
|
||||||
|
|
||||||
return sb.toString()
|
return sb.toString()
|
||||||
}
|
}
|
||||||
lateinit var type: TerrainType
|
lateinit var type: TerrainType
|
||||||
@ -62,6 +65,7 @@ class Terrain : NamedStats(), ICivilopedia {
|
|||||||
var movementCost = 1
|
var movementCost = 1
|
||||||
var defenceBonus:Float = 0f
|
var defenceBonus:Float = 0f
|
||||||
var impassable = false
|
var impassable = false
|
||||||
|
var rough = false
|
||||||
|
|
||||||
fun getColor(): Color = colorFromRGB(RGB!![0], RGB!![1], RGB!![2])
|
fun getColor(): Color = colorFromRGB(RGB!![0], RGB!![1], RGB!![2])
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user