Unit table now displays ranged strength for ranged units
This commit is contained in:
parent
2bac292ce6
commit
32efae340b
2 changed files with 12 additions and 12 deletions
|
@ -21,8 +21,8 @@ android {
|
||||||
applicationId "com.unciv.game"
|
applicationId "com.unciv.game"
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 37
|
versionCode 38
|
||||||
versionName "1.4.4"
|
versionName "1.4.5"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
|
@ -40,17 +40,17 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){
|
||||||
|
|
||||||
if(selectedUnit!=null) {
|
if(selectedUnit!=null) {
|
||||||
val unit = selectedUnit!!
|
val unit = selectedUnit!!
|
||||||
if (unit.getBaseUnit().unitType == UnitType.Civilian) {
|
var unitLabelText = unit.name +
|
||||||
unitLabel.setText(unit.name
|
"\r\nMovement: " + unit.getMovementString()
|
||||||
+ "\r\nMovement: " + unit.getMovementString()
|
if (unit.getBaseUnit().unitType != UnitType.Civilian) {
|
||||||
)
|
unitLabelText += "\r\nHealth: " + unit.health +
|
||||||
} else {
|
"\r\nStrength: " + unit.getBaseUnit().strength
|
||||||
unitLabel.setText(unit.name
|
|
||||||
+ "\r\nMovement: " + unit.getMovementString()
|
|
||||||
+ "\r\nHealth: " + unit.health
|
|
||||||
+ "\r\nStrength: " + unit.getBaseUnit().strength
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
if (unit.getBaseUnit().unitType == UnitType.Ranged)
|
||||||
|
unitLabelText += "\r\nRanged strength: "+unit.getBaseUnit().rangedStrength
|
||||||
|
|
||||||
|
unitLabel.setText(unitLabelText)
|
||||||
|
|
||||||
for (button in UnitActions().getUnitActions(selectedUnit!!, worldScreen))
|
for (button in UnitActions().getUnitActions(selectedUnit!!, worldScreen))
|
||||||
unitActionsTable.add(button).colspan(2).pad(5f)
|
unitActionsTable.add(button).colspan(2).pad(5f)
|
||||||
.size(button.width * worldScreen.buttonScale, button.height * worldScreen.buttonScale).row()
|
.size(button.width * worldScreen.buttonScale, button.height * worldScreen.buttonScale).row()
|
||||||
|
|
Loading…
Reference in a new issue