Fixed civ name translation in the top bar and great person point percentage bonuses

This commit is contained in:
Yair Morgenstern 2020-08-04 22:42:36 +03:00
parent 42a96724af
commit 69ed4e3b53
3 changed files with 6 additions and 6 deletions

View File

@ -269,7 +269,7 @@ class CityInfo {
val statName = greatUnitUnique.getPlaceholderParameters()[0]
val stat = Stat.values().firstOrNull { it.name == statName }
// this is not very efficient, and if it causes problems we can try and think of a way of improving it
if (stat != null) entry.value.add(stat, entry.value.get(stat) * params[1].toInt())
if (stat != null) entry.value.add(stat, entry.value.get(stat) * params[1].toFloat()/100)
}
for (unique in civInfo.getMatchingUniques("+[]% great person generation in all cities"))

View File

@ -326,7 +326,7 @@ class EditMultiplayerGameInfoScreen(game: GameInfo, gameName: String, backScreen
init {
val textField = TextField(gameName, skin)
topTable.add(Label("Rename".tr(), skin)).row()
topTable.add("Rename".toLabel()).row()
topTable.add(textField).pad(10f).padBottom(30f).width(stage.width/2).row()
//TODO Change delete to "give up"
@ -392,13 +392,13 @@ class AddMultiplayerGameScreen(backScreen: MultiplayerScreen) : PickerScreen(){
gameIDTextField.text = Gdx.app.clipboard.contents
}
topTable.add(Label("GameID".tr(), skin)).row()
topTable.add("GameID".toLabel()).row()
val gameIDTable = Table()
gameIDTable.add(gameIDTextField).pad(10f).width(2*stage.width/3 - pasteGameIDButton.width)
gameIDTable.add(pasteGameIDButton)
topTable.add(gameIDTable).padBottom(30f).row()
topTable.add(Label("Game name".tr(), skin)).row()
topTable.add("Game name".toLabel()).row()
topTable.add(gameNameTextField).pad(10f).padBottom(30f).width(stage.width/2).row()
//CloseButton Setup

View File

@ -209,9 +209,9 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() {
}
private fun updateSelectedCivTabel() {
if (selectedCivLabel.text.toString() == worldScreen.selectedCiv.civName) return
if (selectedCivLabel.text.toString() == worldScreen.selectedCiv.civName.tr()) return
selectedCivLabel.setText(worldScreen.selectedCiv.civName)
selectedCivLabel.setText(worldScreen.selectedCiv.civName.tr())
val nation = worldScreen.gameInfo.ruleSet.nations[worldScreen.selectedCiv.civName]!!
val selectedCivIcon = ImageGetter.getNationIndicator(nation, 35f)