Even more pixel images!

Added Pillaging tutorial
This commit is contained in:
Yair Morgenstern 2019-10-15 16:00:07 +03:00
parent f7a9aa9bb6
commit 14cbe9e21d
19 changed files with 625 additions and 548 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -392,4 +392,12 @@
]
],
_Pillaging:[
[
"Military units can pillage improvements, which heals them 25 health and ruins the improvement.",
"The tile can still be worked, but advantages from the improvement - stat bonuses and resources - will be lost.",
"Workers can repair these improvements, which takes less time than building the improvement from scratch.",
]
]
}

View File

@ -408,12 +408,18 @@ open class TileGroup(var tileInfo: TileInfo, var tileSetStrings:TileSetStrings)
fun updatePixelMilitaryUnit(showMilitaryUnit: Boolean) {
var newImageLocation = ""
if (tileInfo.militaryUnit != null && showMilitaryUnit) {
val unitType = tileInfo.militaryUnit!!.type
val specificUnitIconLocation = tileSetStrings.unitsLocation + tileInfo.militaryUnit!!.name
val militaryUnit = tileInfo.militaryUnit
if (militaryUnit != null && showMilitaryUnit) {
val unitType = militaryUnit.type
val specificUnitIconLocation = tileSetStrings.unitsLocation + militaryUnit.name
newImageLocation = when {
!UnCivGame.Current.settings.showPixelUnits -> ""
ImageGetter.imageExists(specificUnitIconLocation) -> specificUnitIconLocation
militaryUnit.baseUnit.replaces!=null &&
ImageGetter.imageExists(tileSetStrings.unitsLocation + militaryUnit.baseUnit.replaces) ->
tileSetStrings.unitsLocation + militaryUnit.baseUnit.replaces
unitType == UnitType.Mounted -> tileSetStrings.unitsLocation + "Horseman"
unitType == UnitType.Ranged -> tileSetStrings.unitsLocation + "Archer"
unitType == UnitType.Armor -> tileSetStrings.unitsLocation + "Tank"