diff --git a/android/assets/jsons/translations/Czech.properties b/android/assets/jsons/translations/Czech.properties index 2db661dc83..821691d25c 100644 --- a/android/assets/jsons/translations/Czech.properties +++ b/android/assets/jsons/translations/Czech.properties @@ -600,7 +600,7 @@ Great person points = Body velké osobnosti Current points = Získané body Points per turn = Bodů za tah Convert production to gold at a rate of 4 to 1 = Převést produkci na zlato v poměru 4 ku 1 -Convert production to science at a rate of 4 to 1 = Převést produkci na výzkum v poměru 4 ku 1 +Convert production to science at a rate of [rate] to 1 = Převést produkci na výzkum v poměru [rate] ku 1 The city will not produce anything. = Město nebude nic vyrábět. # Technology UI @@ -679,7 +679,7 @@ Science victory = Výzkumné vítězství Cultural victory = Kulturní vítězství Conquest victory = Vítězství v boji Complete all the spaceship parts\n to win! = Vybudováním všech šesti části vesmírné lodi\n dosáhneme vítězství! -Complete 5 policy branches\n to win! = Zkompletováním 4 větví Sociální politiky\n dosáhneme vítězství! +Complete 5 policy branches\n to win! = Zkompletováním 5 větví Sociální politiky\n dosáhneme vítězství! Destroy all enemies\n to win! = Zničením všech ostatních civilizací\n dosáhneme vítězství! You have won a scientific victory! = Dosáhli jste vítězství ve hře díky Výzkumu! You have won a cultural victory! = Dosáhli jste vítězství ve hře díky Kulturní vyspělosti! diff --git a/android/assets/jsons/translations/Dutch.properties b/android/assets/jsons/translations/Dutch.properties index 73f1ed82d5..d83e1cd0e6 100644 --- a/android/assets/jsons/translations/Dutch.properties +++ b/android/assets/jsons/translations/Dutch.properties @@ -972,7 +972,7 @@ Points per turn = # Requires translation! Convert production to gold at a rate of 4 to 1 = # Requires translation! -Convert production to science at a rate of 4 to 1 = +Convert production to science at a rate of [rate] to 1 = # Requires translation! The city will not produce anything. = diff --git a/android/assets/jsons/translations/English.properties b/android/assets/jsons/translations/English.properties index 8e71a3d453..17cffa5bc5 100644 --- a/android/assets/jsons/translations/English.properties +++ b/android/assets/jsons/translations/English.properties @@ -1114,7 +1114,7 @@ Points per turn = # Requires translation! Convert production to gold at a rate of 4 to 1 = # Requires translation! -Convert production to science at a rate of 4 to 1 = +Convert production to science at a rate of [rate] to 1 = # Requires translation! The city will not produce anything. = diff --git a/android/assets/jsons/translations/French.properties b/android/assets/jsons/translations/French.properties index 15eb95c7ec..4a0e698728 100644 --- a/android/assets/jsons/translations/French.properties +++ b/android/assets/jsons/translations/French.properties @@ -600,7 +600,7 @@ Great person points = Points de personnage illustre Current points = Nombre actuel de points Points per turn = Points par tour Convert production to gold at a rate of 4 to 1 = Convertit la production en or au taux de 4 pour 1 -Convert production to science at a rate of 4 to 1 = Convertit la production en science au taux de 4 pour 1 +Convert production to science at a rate of [rate] to 1 = Convertit la production en science au taux de [rate] pour 1 The city will not produce anything. = La cité ne produira plus rien # Technology UI diff --git a/android/assets/jsons/translations/German.properties b/android/assets/jsons/translations/German.properties index 3de29261c3..b9b9b1c670 100644 --- a/android/assets/jsons/translations/German.properties +++ b/android/assets/jsons/translations/German.properties @@ -599,8 +599,8 @@ Are you sure you want to sell this [building]? = [building] wirklich verkaufen? Great person points = Punkte für Große Persönlichkeit Current points = Aktuelle Punkte Points per turn = Punkte pro Runde -Convert production to gold at a rate of 4 to 1 = Verwandel Produktion zu Gold (4:1) -Convert production to science at a rate of 4 to 1 = Verwandel Produktion zu Wissenschaft (4:1) +Convert production to gold at a rate of 4 to 1 = Konvertiert Produktion zu Gold (4:1) +Convert production to science at a rate of [rate] to 1 = Konvertiert Produktion zu Wissenschaft ([rate]:1) The city will not produce anything. = Die Stadt produziert nichts. # Technology UI diff --git a/android/assets/jsons/translations/Indonesian.properties b/android/assets/jsons/translations/Indonesian.properties index 8bd9152aad..d3f0896580 100644 --- a/android/assets/jsons/translations/Indonesian.properties +++ b/android/assets/jsons/translations/Indonesian.properties @@ -670,7 +670,7 @@ Great person points = Poin orang hebat Current points = Poin saat ini Points per turn = Poin per giliran Convert production to gold at a rate of 4 to 1 = Konversi produksi ke emas dalam taksiran 4 sampai 1 -Convert production to science at a rate of 4 to 1 = Konversi produksi ke ilmu pengetahuan dalam taksiran 4 sampai 1 +Convert production to science at a rate of [rate] to 1 = Konversi produksi ke ilmu pengetahuan dalam taksiran [rate] sampai 1 The city will not produce anything. = Kota ini tidak akan memproduksi apapun. # Technology UI diff --git a/android/assets/jsons/translations/Italian.properties b/android/assets/jsons/translations/Italian.properties index 953da97910..f75a867f23 100644 --- a/android/assets/jsons/translations/Italian.properties +++ b/android/assets/jsons/translations/Italian.properties @@ -600,7 +600,7 @@ Great person points = Punti Grande Personaggio Current points = Punti attuali Points per turn = Punti per turno Convert production to gold at a rate of 4 to 1 = Converte la Produzione a Oro a un tasso di 4 a 1 -Convert production to science at a rate of 4 to 1 = Converte la Produzione a Scienza a un tasso di 4 a 1 +Convert production to science at a rate of [rate] to 1 = Converte la Produzione a Scienza a un tasso di [rate] a 1 The city will not produce anything. = La città non produrrà nulla # Technology UI diff --git a/android/assets/jsons/translations/Japanese.properties b/android/assets/jsons/translations/Japanese.properties index a8cd71ede9..d68014bf7e 100644 --- a/android/assets/jsons/translations/Japanese.properties +++ b/android/assets/jsons/translations/Japanese.properties @@ -642,7 +642,7 @@ Great person points = 偉人ポイント Current points = 今のポイント Points per turn = ターンごとのポイント Convert production to gold at a rate of 4 to 1 = 生産力を4対1の割合でゴールドに変換する -Convert production to science at a rate of 4 to 1 = 生産力を4対1の割合で科学力に変換する +Convert production to science at a rate of [rate] to 1 = 生産力を[rate]対1の割合で科学力に変換する The city will not produce anything. = 都市は何も生産しません # Technology UI diff --git a/android/assets/jsons/translations/Korean.properties b/android/assets/jsons/translations/Korean.properties index f5063aed74..18a740d47a 100644 --- a/android/assets/jsons/translations/Korean.properties +++ b/android/assets/jsons/translations/Korean.properties @@ -712,7 +712,7 @@ Great person points = 위인 포인트 Current points = 현재 포인트 Points per turn = 턴당 포인트 Convert production to gold at a rate of 4 to 1 = 생산력의 1/4에 해당하는 양의 금 생산 -Convert production to science at a rate of 4 to 1 = 생산력의 1/4에 해당하는 양의 과학 생산 +Convert production to science at a rate of [rate] to 1 = 생산력의 1/[rate]에 해당하는 양의 과학 생산 The city will not produce anything. = 도시 생산 중단하기 # Technology UI diff --git a/android/assets/jsons/translations/Malay.properties b/android/assets/jsons/translations/Malay.properties index d4d5a645b4..99990ada49 100644 --- a/android/assets/jsons/translations/Malay.properties +++ b/android/assets/jsons/translations/Malay.properties @@ -1068,7 +1068,7 @@ Points per turn = # Requires translation! Convert production to gold at a rate of 4 to 1 = # Requires translation! -Convert production to science at a rate of 4 to 1 = +Convert production to science at a rate of [rate] to 1 = # Requires translation! The city will not produce anything. = diff --git a/android/assets/jsons/translations/Polish.properties b/android/assets/jsons/translations/Polish.properties index 76a444df65..eba92ff731 100644 --- a/android/assets/jsons/translations/Polish.properties +++ b/android/assets/jsons/translations/Polish.properties @@ -603,7 +603,7 @@ Great person points = Punkty wielkiego człowieka Current points = Obecne punkty Points per turn = Punkty na turę Convert production to gold at a rate of 4 to 1 = Przetwarzanie produkcji na złoto po kursie 4 do 1 -Convert production to science at a rate of 4 to 1 = Przetwarzanie produkcji na naukę po kursie 4 do 1 +Convert production to science at a rate of [rate] to 1 = Przetwarzanie produkcji na naukę po kursie [rate] do 1 The city will not produce anything. = Miasto niczego nie produkuje # Technology UI diff --git a/android/assets/jsons/translations/Portuguese.properties b/android/assets/jsons/translations/Portuguese.properties index 0f47dec74f..731e65b1f8 100644 --- a/android/assets/jsons/translations/Portuguese.properties +++ b/android/assets/jsons/translations/Portuguese.properties @@ -728,7 +728,7 @@ Great person points = Pontos de grandes pessoas Current points = Pontos atuais Points per turn = Pontos por turno Convert production to gold at a rate of 4 to 1 = Coverter produção em ouro a uma taxa de 4 para 1 -Convert production to science at a rate of 4 to 1 = Coverter produção em ciência a uma taxa de 4 para 1 +Convert production to science at a rate of [rate] to 1 = Coverter produção em ciência a uma taxa de [rate] para 1 The city will not produce anything. = A cidade não vai produzir nada. # Technology UI diff --git a/android/assets/jsons/translations/Romanian.properties b/android/assets/jsons/translations/Romanian.properties index eb20357049..cef4be8072 100644 --- a/android/assets/jsons/translations/Romanian.properties +++ b/android/assets/jsons/translations/Romanian.properties @@ -726,7 +726,7 @@ Great person points = Puncte pentru oameni extraordinari Current points = Puncte actuale Points per turn = Puncte pe tură Convert production to gold at a rate of 4 to 1 = Convertește producție în aur cu o rată de 4 la 1 -Convert production to science at a rate of 4 to 1 = Convertește producție în știință cu o rată de 4 la 1 +Convert production to science at a rate of [rate] to 1 = Convertește producție în știință cu o rată de [rate] la 1 The city will not produce anything. = Acest oraș nu va produce nimic # Technology UI diff --git a/android/assets/jsons/translations/Russian.properties b/android/assets/jsons/translations/Russian.properties index fa37c83572..4c8ec95d2d 100644 --- a/android/assets/jsons/translations/Russian.properties +++ b/android/assets/jsons/translations/Russian.properties @@ -613,7 +613,7 @@ Great person points = Очки великих людей Current points = Очков сейчас Points per turn = Очки за ход Convert production to gold at a rate of 4 to 1 = Обмен производства на золото 4 к 1 -Convert production to science at a rate of 4 to 1 = Обмен производства на науку 4 к 1 +Convert production to science at a rate of [rate] to 1 = Обмен производства на науку [rate] к 1 The city will not produce anything. = Город ничего не будет производить. # Technology UI diff --git a/android/assets/jsons/translations/Simplified_Chinese.properties b/android/assets/jsons/translations/Simplified_Chinese.properties index 53a71b4c71..4036dfa9df 100644 --- a/android/assets/jsons/translations/Simplified_Chinese.properties +++ b/android/assets/jsons/translations/Simplified_Chinese.properties @@ -616,7 +616,7 @@ Great person points = 伟人点数 Current points = 当前点数 Points per turn = 获得点数/回合 Convert production to gold at a rate of 4 to 1 = 按4:1的比例转化产能为金钱 -Convert production to science at a rate of 4 to 1 = 按4:1的比例转化产能为科研 +Convert production to science at a rate of [rate] to 1 = 按[rate]:1的比例转化产能为科研 The city will not produce anything. = 城市将不会建造/组建任何项目 # Technology UI diff --git a/android/assets/jsons/translations/Spanish.properties b/android/assets/jsons/translations/Spanish.properties index 5f470a4bcb..d37bbb0a87 100644 --- a/android/assets/jsons/translations/Spanish.properties +++ b/android/assets/jsons/translations/Spanish.properties @@ -681,7 +681,7 @@ Great person points = Puntos de Gran Personaje Current points = Puntos actuales Points per turn = Puntos por turno Convert production to gold at a rate of 4 to 1 = Convertir la producción en oro a una tasa de 4 a 1 -Convert production to science at a rate of 4 to 1 = Convertir la producción en ciencia a una tasa de 4 a 1 +Convert production to science at a rate of [rate] to 1 = Convertir la producción en ciencia a una tasa de [rate] a 1 The city will not produce anything. = La ciudad no producirá nada. # Technology UI diff --git a/android/assets/jsons/translations/Thai.properties b/android/assets/jsons/translations/Thai.properties index b9626e48b1..8ece34202d 100644 --- a/android/assets/jsons/translations/Thai.properties +++ b/android/assets/jsons/translations/Thai.properties @@ -693,7 +693,7 @@ Great person points = แต้มบุคคลผู้ยิ่งใหญ Current points = แต้มปัจจุบัน Points per turn = แต้มต่อเทิร์น Convert production to gold at a rate of 4 to 1 = เปลี่ยนการผลิตไปเป็นทองที่อัตรา 4 ถึง 1 -Convert production to science at a rate of 4 to 1 = เปลี่ยนการผลิตไปเป็นวิทยาศาสตร์ที่อัตรา 4 ถึง 1 +Convert production to science at a rate of [rate] to 1 = เปลี่ยนการผลิตไปเป็นวิทยาศาสตร์ที่อัตรา [rate] ถึง 1 The city will not produce anything. = เมืองจะไม่ผลิตอะไรเลย # Technology UI diff --git a/android/assets/jsons/translations/Traditional_Chinese.properties b/android/assets/jsons/translations/Traditional_Chinese.properties index 301db6f279..1c884ddca6 100644 --- a/android/assets/jsons/translations/Traditional_Chinese.properties +++ b/android/assets/jsons/translations/Traditional_Chinese.properties @@ -601,7 +601,7 @@ Great person points = 偉人點數 Current points = 目前點數 Points per turn = 獲得點數/回合 Convert production to gold at a rate of 4 to 1 = 按4:1的比例轉化產能為金錢 -Convert production to science at a rate of 4 to 1 = 按4:1的比例轉化產能為科研 +Convert production to science at a rate of [rate] to 1 = 按[rate]:1的比例轉化產能為科研 The city will not produce anything. = 城市將不會建造/訓練任何項目 # Technology UI diff --git a/android/assets/jsons/translations/Turkish.properties b/android/assets/jsons/translations/Turkish.properties index 8e1abaad8e..d81e5c09b1 100644 --- a/android/assets/jsons/translations/Turkish.properties +++ b/android/assets/jsons/translations/Turkish.properties @@ -614,7 +614,7 @@ Great person points = Harika insan puanları Current points = Mevcut puan Points per turn = Tur başına puan Convert production to gold at a rate of 4 to 1 = Üretimi 4'e 1 oranında altına çevir -Convert production to science at a rate of 4 to 1 = Üretimi 4'e 1 oranında bilime dönüştür +Convert production to science at a rate of [rate] to 1 = Üretimi [rate]'e 1 oranında bilime dönüştür The city will not produce anything. = Şehir hiçbir şey üretmeyecek # Technology UI diff --git a/android/assets/jsons/translations/Ukrainian.properties b/android/assets/jsons/translations/Ukrainian.properties index 21ba46853c..64c6d8f68e 100644 --- a/android/assets/jsons/translations/Ukrainian.properties +++ b/android/assets/jsons/translations/Ukrainian.properties @@ -600,7 +600,7 @@ Great person points = Очки великих людей Current points = Поточні очки Points per turn = Очки за хід Convert production to gold at a rate of 4 to 1 = Конвертує виробництво в золото з курсом 4 до 1 -Convert production to science at a rate of 4 to 1 = Конвертує виробництво в науку з курсом 4 до 1 +Convert production to science at a rate of [rate] to 1 = Конвертує виробництво в науку з курсом [rate] до 1 The city will not produce anything. = Місто не буде нічого виробляти. # Technology UI diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 3edb949a62..4916ef25fe 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -600,7 +600,7 @@ Great person points = Current points = Points per turn = Convert production to gold at a rate of 4 to 1 = -Convert production to science at a rate of 4 to 1 = +Convert production to science at a rate of [rate] to 1 = The city will not produce anything. = # Technology UI diff --git a/core/src/com/unciv/Constants.kt b/core/src/com/unciv/Constants.kt index adbd0a440f..d79e067282 100644 --- a/core/src/com/unciv/Constants.kt +++ b/core/src/com/unciv/Constants.kt @@ -61,4 +61,6 @@ object Constants { const val tutorialPopupNamePrefix = "Tutorial: " const val close = "Close" + + const val scienceConversionEffect = "Production to science conversion in cities increased by 33%" } \ No newline at end of file diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 26fb0be909..304b04ac7f 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -64,7 +64,7 @@ class CityStats { "Gold" -> stats.gold += production / 4 "Science" -> { var scienceProduced = production / 4 - if (cityInfo.civInfo.policies.hasEffect("Production to science conversion in cities increased by 33%")) scienceProduced *= 1.33f + if (cityInfo.civInfo.policies.hasEffect(Constants.scienceConversionEffect)) scienceProduced *= 1.33f stats.science += scienceProduced } } diff --git a/core/src/com/unciv/logic/city/IConstruction.kt b/core/src/com/unciv/logic/city/IConstruction.kt index 0d2f5db7b0..a44ba89a74 100644 --- a/core/src/com/unciv/logic/city/IConstruction.kt +++ b/core/src/com/unciv/logic/city/IConstruction.kt @@ -1,5 +1,6 @@ package com.unciv.logic.city +import com.unciv.Constants import com.unciv.logic.civilization.CivilizationInfo import com.unciv.models.stats.INamed import com.unciv.models.translations.tr @@ -17,19 +18,27 @@ interface IConstruction : INamed { -open class PerpetualConstruction(override var name: String, val description: String) : IConstruction{ +open class PerpetualConstruction(override var name: String, val description: String) : IConstruction { override fun shouldBeDisplayed(cityConstructions: CityConstructions): Boolean { return isBuildable(cityConstructions) } open fun getProductionTooltip(cityInfo: CityInfo) : String = "\r\n${(cityInfo.cityStats.currentCityStats.production / CONVERSION_RATE).roundToInt()}/${"{turn}".tr()}" + open fun getConversionRate(cityInfo: CityInfo) : Int + = CONVERSION_RATE companion object { const val CONVERSION_RATE: Int = 4 - val science = object : PerpetualConstruction("Science", "Convert production to science at a rate of $CONVERSION_RATE to 1") { + const val CONVERSION_RATE_WITH_POLICY = CONVERSION_RATE * 3 / 4 + val science = object : PerpetualConstruction("Science", "Convert production to science at a rate of [rate] to 1") { override fun isBuildable(cityConstructions: CityConstructions): Boolean { return cityConstructions.cityInfo.civInfo.tech.getTechUniques().contains("Enables conversion of city production to science") } + override fun getProductionTooltip(cityInfo: CityInfo): String { + return "\r\n${(cityInfo.cityStats.currentCityStats.production / getConversionRate(cityInfo)).roundToInt()}/${"{turn}".tr()}" + } + override fun getConversionRate(cityInfo: CityInfo): Int + = if (cityInfo.civInfo.policies.hasEffect(Constants.scienceConversionEffect)) CONVERSION_RATE_WITH_POLICY else CONVERSION_RATE } val gold = object : PerpetualConstruction("Gold", "Convert production to gold at a rate of $CONVERSION_RATE to 1") { override fun isBuildable(cityConstructions: CityConstructions): Boolean { diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt index 41245d452a..f859c3b629 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt @@ -66,7 +66,7 @@ class ConstructionInfoTable(val city: CityInfo): Table() { else if (construction is Building) description = construction.getDescription(true, city.civInfo, city.civInfo.gameInfo.ruleSet) else if(construction is PerpetualConstruction) - description = construction.description.tr() + description = construction.description.replace("[rate]","[${construction.getConversionRate(city)}]") .tr() else description="" // Should never happen val descriptionLabel = description.toLabel()