Update Turkish.properties (#1907)

* Cleaned up Unit Actions

* Resolved #1902 - buildings requiring worked resources can be built in cities that are built on that resource

* Legalism grants enqueued buildings (#1906)

* Update Turkish.properties

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: Federico Luongo <fluo392@gmail.com>
This commit is contained in:
rayray61 2020-02-11 16:31:25 +03:00 committed by GitHub
parent b3824983a0
commit 9ee0c94bf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 219 additions and 210 deletions

View file

@ -532,14 +532,10 @@ Spain = İspanya
Isabella = İsabella
100 Gold for discovering a Natural Wonder (bonus enhanced to 500 Gold if first to discover it). Culture, Happiness and tile yields from Natural Wonders doubled. = Doğal Mucizeyi keşfetmek +100 Altın (ilk önce keşfedilirse 500 Altın'a yükseltilmiş bonus). Natural Wonders'tan kültür, mutluluk ve bölge verimi iki katına çıktar.
# Requires translation!
Mongolia =
# Requires translation!
Genghis Khan =
# Requires translation!
Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement. =
# Requires translation!
Mongol Terror =
Mongolia = Moğolistan
Genghis Khan = Cengiz Han
Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement. = Şehir Devletlerinin birlikleri ile savaşırken veya bir Şehir Devletinin kendisine saldırırken Savaş Gücü +30%. Atlı tüm birimlerin +1 Hareketi vardır.
Mongol Terror = Moğol Terörü
# New game screen
@ -554,8 +550,7 @@ Game options = Oyun seçenekleri
Map type = Harita türü
Generated = Oluşturuldu
Existing = Mevcut
# Requires translation!
Custom =
Custom = Elle yapılmış
Map generation type = Harita oluşturma türü
Default = Varsayılan
Pangaea = Pangea
@ -571,33 +566,20 @@ Scientific = Bilimsel
Domination = Hakimiyet
Cultural = Kültürel
# Requires translation!
Map shape =
# Requires translation!
Hexagonal =
# Requires translation!
Rectangular =
Map shape = Harita şekli
Hexagonal = Altıgen şeklinde
Rectangular = Dikdörtgen biçiminde
# Requires translation!
Show advanced settings =
# Requires translation!
Hide advanced settings =
# Requires translation!
Map Height =
# Requires translation!
Temperature extremeness =
# Requires translation!
Resource richness =
# Requires translation!
Terrain Features richness =
# Requires translation!
Max Coast extension =
# Requires translation!
Biome areas extension =
# Requires translation!
Water percent =
# Requires translation!
Land percent =
Show advanced settings = Gelişmiş ayarları göster
Hide advanced settings = Gelişmiş ayarları gizle
Map Height = Harita Yüksekliği
Temperature extremeness = Sıcaklık aşırılığı
Resource richness = Kaynak zenginliği
Terrain Features richness = Arazi Özellikleri zenginliği
Max Coast extension = Azami Kıyı uzantısı
Biome areas extension = Biyom alanlarının genişletilmesi
Water percent = Su yüzdesi
Land percent = Arazi yüzdesi
HIGHLY EXPERIMENTAL - YOU HAVE BEEN WARNED! = AŞIRI DENEYSEL - UYARILDINIZ!
Online Multiplayer = Çevrimiçi Çok Oyunculu
@ -799,12 +781,10 @@ Automate = Otomatikleştir
Stop automation = Otomasyonu durdur
Construct road = Yol inşaa et
Fortify = Güçlendirme
# Requires translation!
Fortify until healed =
Fortify until healed = İyileşene kadar tahkimat
Fortification = Tahkimat
Sleep = Uyu
# Requires translation!
Sleep until healed =
Sleep until healed = İyileşene kadar uyu
Moving = Harekette
Set up = Kur
Upgrade to [unitType] ([goldCost] gold) = [unitType] ([goldCost] altın) sürümüne yükseltin
@ -1546,10 +1526,8 @@ Camel Archer = Deve Okçusu
Conquistador = Conquistador
Mandekalu Cavalry = Mandekalu Süvarisi
Defense bonus when embarked = Denize girdiğinde savunma bonusu
# Requires translation!
Keshik =
# Requires translation!
50% Bonus XP gain =
Keshik = Haşhaşi
50% Bonus XP gain = 50% Bonus XP kazancı
Naresuan's Elephant = Naresuan'ın Fili
Samurai = Samuray
Combat very likely to create Great Generals = Büyük General yaratma ihtimali çok yüksek
@ -1629,10 +1607,8 @@ Can speed up construction of a wonder = Eser inşaatı hızlandırılabilir
Can build improvement: Manufactory = Fabrikada geliştirme üretilebilir
Great General = Harika General
Bonus for units in 2 tile radius 15% = 2 kare yarıçapındaki birimler için 15% bonus
# Requires translation!
Khan =
# Requires translation!
Heal adjacent units for an additional 15 HP per turn =
Khan = Kağan
Heal adjacent units for an additional 15 HP per turn = Bitişik birimlere iyileştirme başına 15 can ilave edin
# Promotions

View file

@ -301,14 +301,14 @@ class CityConstructions {
fun hasBuildableCultureBuilding(): Boolean {
return getBasicCultureBuildings()
.map { cityInfo.civInfo.getEquivalentBuilding(it.name) }
.filter { it.isBuildable(this) || it.name == currentConstruction}
.filter { it.isBuildable(this) || isBeingConstructedOrEnqueued(it.name) }
.any()
}
fun addCultureBuilding(): String? {
val buildableCultureBuildings = getBasicCultureBuildings()
.map { cityInfo.civInfo.getEquivalentBuilding(it.name) }
.filter { it.isBuildable(this) || it.name == currentConstruction }
.filter { it.isBuildable(this) || isBeingConstructedOrEnqueued(it.name) }
if (!buildableCultureBuildings.any())
return null
@ -316,8 +316,10 @@ class CityConstructions {
val cultureBuildingToBuild = buildableCultureBuildings.minBy { it.cost }!!.name
constructionComplete(getConstruction(cultureBuildingToBuild))
if (currentConstruction == cultureBuildingToBuild)
if (isBeingConstructed(cultureBuildingToBuild))
cancelCurrentConstruction()
else if (isEnqueued(cultureBuildingToBuild))
removeFromQueue(cultureBuildingToBuild)
return cultureBuildingToBuild
}
@ -353,6 +355,11 @@ class CityConstructions {
}
}
fun removeFromQueue(constructionName: String) {
if (constructionName in constructionQueue)
constructionQueue.remove(constructionName)
}
fun removeFromQueue(constructionQueueIndex: Int) {
// constructionQueueIndex -1 is the current construction
if (constructionQueueIndex < 0) {

View file

@ -311,8 +311,8 @@ class Building : NamedStats(), IConstruction{
.any {
it.resource != null
&& requiredNearbyImprovedResources!!.contains(it.resource!!)
&& (it.getTileResource().improvement == it.improvement || it.improvement in Constants.greatImprovements)
&& it.getOwner() == civInfo
&& (it.getTileResource().improvement == it.improvement || it.improvement in Constants.greatImprovements || it.isCityCenter())
}
if (!containsResourceWithImprovement) return "Nearby $requiredNearbyImprovedResources required"
}

View file

@ -53,155 +53,40 @@ class UnitActions {
)
}
if (!unit.type.isAirUnit()) {
if (unit.action != Constants.unitActionExplore) {
actionList += UnitAction(
type = UnitActionType.Explore,
canAct = true,
action = {
UnitAutomation().automatedExplore(unit)
unit.action = Constants.unitActionExplore
})
} else {
actionList += UnitAction(
type = UnitActionType.StopExploration,
canAct = true,
action = { unit.action = null }
)
}
}
addExplorationActions(unit, actionList)
addPromoteAction(unit, actionList)
addUnitUpgradeAction(unit, tile, actionList, worldScreen)
addPillageAction(unit, tile, actionList)
addSetupAction(unit, actionList)
addFoundCityAction(unit, actionList, tile)
addWorkerActions(unit, actionList, tile, worldScreen, unitTable)
addConstructRoadsAction(unit, tile, actionList)
addCreateWaterImprovements(unit, tile, actionList)
addGreatPersonActions(unit, actionList, tile)
addDisbandAction(actionList, unit, worldScreen)
if (!unit.type.isCivilian() && unit.promotions.canBePromoted()) {
// promotion does not consume movement points, so we can do it always
actionList += UnitAction(
type = UnitActionType.Promote,
canAct = true,
uncivSound = UncivSound.Promote,
action = {
UncivGame.Current.setScreen(PromotionPickerScreen(unit))
})
}
return actionList
}
if (unit.baseUnit().upgradesTo != null && tile.getOwner() == unit.civInfo) {
if (unit.canUpgrade()) {
val goldCostOfUpgrade = unit.getCostOfUpgrade()
val upgradedUnit = unit.getUnitToUpgradeTo()
actionList += UnitAction(
type = UnitActionType.Upgrade,
title = "Upgrade to [${upgradedUnit.name}] ([$goldCostOfUpgrade] gold)",
canAct = unit.civInfo.gold >= goldCostOfUpgrade && !unit.isEmbarked() && unit.currentMovement == unit.getMaxMovement().toFloat(),
uncivSound = UncivSound.Upgrade,
action = {
unit.civInfo.gold -= goldCostOfUpgrade
val unitTile = unit.getTile()
unit.destroy()
val newunit = unit.civInfo.placeUnitNearTile(unitTile.position, upgradedUnit.name)!!
newunit.health = unit.health
newunit.promotions = unit.promotions
for (promotion in newunit.baseUnit.promotions)
if (promotion !in newunit.promotions.promotions)
newunit.promotions.addPromotion(promotion, true)
newunit.updateUniques()
newunit.updateVisibleTiles()
newunit.currentMovement = 0f
worldScreen.shouldUpdate = true
})
}
}
if (!unit.type.isCivilian() && tile.improvement != null) {
actionList += UnitAction(
type = UnitActionType.Pillage,
canAct = unit.currentMovement > 0 && canPillage(unit, tile),
action = {
// http://well-of-souls.com/civ/civ5_improvements.html says that naval improvements are destroyed upon pilllage
// and I can't find any other sources so I'll go with that
if (tile.isLand) {
tile.improvementInProgress = tile.improvement
tile.turnsToImprovement = 2
}
tile.improvement = null
if (!unit.hasUnique("No movement cost to pillage")) unit.useMovementPoints(1f)
unit.healBy(25)
})
}
if (unit.hasUnique("Must set up to ranged attack") && !unit.isEmbarked()) {
val setUp = unit.action == "Set Up"
actionList += UnitAction(
type = UnitActionType.SetUp,
canAct = unit.currentMovement > 0 && !setUp,
isCurrentAction = setUp,
uncivSound = UncivSound.Setup,
action = {
unit.action = Constants.unitActionSetUp
unit.useMovementPoints(1f)
})
}
if (unit.hasUnique("Founds a new city") && !unit.isEmbarked()) {
actionList += UnitAction(
type = UnitActionType.FoundCity,
canAct = unit.currentMovement > 0 && !tile.getTilesInDistance(3).any { it.isCityCenter() },
uncivSound = UncivSound.Chimes,
action = {
UncivGame.Current.settings.addCompletedTutorialTask("Found city")
unit.civInfo.addCity(tile.position)
tile.improvement = null
unit.destroy()
})
}
if (unit.hasUnique("Can build improvements on tiles") && !unit.isEmbarked()) {
actionList += UnitAction(
type = UnitActionType.ConstructImprovement,
canAct = unit.currentMovement > 0
&& !tile.isCityCenter()
&& unit.civInfo.gameInfo.ruleSet.tileImprovements.values.any { tile.canBuildImprovement(it, unit.civInfo) },
isCurrentAction = unit.currentTile.hasImprovementInProgress(),
action = {
worldScreen.game.setScreen(ImprovementPickerScreen(tile) { unitTable.selectedUnit = null })
})
if (Constants.unitActionAutomation == unit.action) {
actionList += UnitAction(
type = UnitActionType.StopAutomation,
canAct = true,
action = { unit.action = null }
)
} else {
actionList += UnitAction(
type = UnitActionType.Automate,
canAct = unit.currentMovement > 0,
action = {
unit.action = Constants.unitActionAutomation
WorkerAutomation(unit).automateWorkerAction()
})
}
}
if (unit.hasUnique("Can construct roads")
&& tile.roadStatus == RoadStatus.None
&& tile.improvementInProgress != "Road"
&& tile.isLand
&& unit.civInfo.tech.isResearched(RoadStatus.Road.improvement(unit.civInfo.gameInfo.ruleSet)!!.techRequired!!))
actionList += UnitAction(
type = UnitActionType.ConstructRoad,
canAct = unit.currentMovement > 0,
action = {
tile.improvementInProgress = "Road"
tile.turnsToImprovement = 4
})
private fun addDisbandAction(actionList: ArrayList<UnitAction>, unit: MapUnit, worldScreen: WorldScreen) {
actionList += UnitAction(
type = UnitActionType.DisbandUnit,
canAct = unit.currentMovement > 0,
action = {
val disbandText = if (unit.currentTile.getOwner() == unit.civInfo)
"Disband this unit for [${unit.baseUnit.getDisbandGold()}] gold?".tr()
else "Do you really want to disband this unit?".tr()
YesNoPopup(disbandText, { unit.disband(); worldScreen.shouldUpdate = true }).open()
})
}
private fun addCreateWaterImprovements(unit: MapUnit, tile: TileInfo, actionList: ArrayList<UnitAction>) {
for (improvement in listOf("Fishing Boats", "Oil well")) {
if (unit.hasUnique("May create improvements on water resources") && tile.resource != null
&& tile.isWater // because fishing boats can enter cities, and if there's oil in the city... ;)
&& tile.improvement == null
&& tile.getTileResource().improvement == improvement
&& unit.civInfo.tech.isResearched(unit.civInfo.gameInfo.ruleSet.tileImprovements[improvement]!!.techRequired!!)
&& tile.isWater // because fishing boats can enter cities, and if there's oil in the city... ;)
&& tile.improvement == null
&& tile.getTileResource().improvement == improvement
&& unit.civInfo.tech.isResearched(unit.civInfo.gameInfo.ruleSet.tileImprovements[improvement]!!.techRequired!!)
)
actionList += UnitAction(
type = UnitActionType.Create,
@ -212,7 +97,160 @@ class UnitActions {
unit.destroy()
})
}
}
private fun addConstructRoadsAction(unit: MapUnit, tile: TileInfo, actionList: ArrayList<UnitAction>) {
if (unit.hasUnique("Can construct roads")
&& tile.roadStatus == RoadStatus.None
&& tile.improvementInProgress != "Road"
&& tile.isLand
&& unit.civInfo.tech.isResearched(RoadStatus.Road.improvement(unit.civInfo.gameInfo.ruleSet)!!.techRequired!!))
actionList += UnitAction(
type = UnitActionType.ConstructRoad,
canAct = unit.currentMovement > 0,
action = {
tile.improvementInProgress = "Road"
tile.turnsToImprovement = 4
})
}
private fun addFoundCityAction(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo) {
if (!unit.hasUnique("Founds a new city") || unit.isEmbarked()) return
actionList += UnitAction(
type = UnitActionType.FoundCity,
canAct = unit.currentMovement > 0 && !tile.getTilesInDistance(3).any { it.isCityCenter() },
uncivSound = UncivSound.Chimes,
action = {
UncivGame.Current.settings.addCompletedTutorialTask("Found city")
unit.civInfo.addCity(tile.position)
tile.improvement = null
unit.destroy()
})
}
private fun addPromoteAction(unit: MapUnit, actionList: ArrayList<UnitAction>) {
if (unit.type.isCivilian() || !unit.promotions.canBePromoted()) return
// promotion does not consume movement points, so we can do it always
actionList += UnitAction(
type = UnitActionType.Promote,
canAct = true,
uncivSound = UncivSound.Promote,
action = {
UncivGame.Current.setScreen(PromotionPickerScreen(unit))
})
}
private fun addSetupAction(unit: MapUnit, actionList: ArrayList<UnitAction>) {
if (!unit.hasUnique("Must set up to ranged attack") || unit.isEmbarked()) return
val isSetUp = unit.action == "Set Up"
actionList += UnitAction(
type = UnitActionType.SetUp,
canAct = unit.currentMovement > 0 && !isSetUp,
isCurrentAction = isSetUp,
uncivSound = UncivSound.Setup,
action = {
unit.action = Constants.unitActionSetUp
unit.useMovementPoints(1f)
})
}
private fun addPillageAction(unit: MapUnit, tile: TileInfo, actionList: ArrayList<UnitAction>) {
if (unit.type.isCivilian() || tile.improvement == null) return
actionList += UnitAction(
type = UnitActionType.Pillage,
canAct = unit.currentMovement > 0 && canPillage(unit, tile),
action = {
// http://well-of-souls.com/civ/civ5_improvements.html says that naval improvements are destroyed upon pilllage
// and I can't find any other sources so I'll go with that
if (tile.isLand) {
tile.improvementInProgress = tile.improvement
tile.turnsToImprovement = 2
}
tile.improvement = null
if (!unit.hasUnique("No movement cost to pillage")) unit.useMovementPoints(1f)
unit.healBy(25)
})
}
private fun addExplorationActions(unit: MapUnit, actionList: ArrayList<UnitAction>) {
if (unit.type.isAirUnit()) return
if (unit.action != Constants.unitActionExplore) {
actionList += UnitAction(
type = UnitActionType.Explore,
canAct = true,
action = {
UnitAutomation().automatedExplore(unit)
unit.action = Constants.unitActionExplore
})
} else {
actionList += UnitAction(
type = UnitActionType.StopExploration,
canAct = true,
action = { unit.action = null }
)
}
}
private fun addUnitUpgradeAction(unit: MapUnit, tile: TileInfo, actionList: ArrayList<UnitAction>, worldScreen: WorldScreen) {
if (unit.baseUnit().upgradesTo == null || tile.getOwner() != unit.civInfo) return
if (!unit.canUpgrade()) return
val goldCostOfUpgrade = unit.getCostOfUpgrade()
val upgradedUnit = unit.getUnitToUpgradeTo()
actionList += UnitAction(
type = UnitActionType.Upgrade,
title = "Upgrade to [${upgradedUnit.name}] ([$goldCostOfUpgrade] gold)",
canAct = unit.civInfo.gold >= goldCostOfUpgrade && !unit.isEmbarked() && unit.currentMovement == unit.getMaxMovement().toFloat(),
uncivSound = UncivSound.Upgrade,
action = {
unit.civInfo.gold -= goldCostOfUpgrade
val unitTile = unit.getTile()
unit.destroy()
val newunit = unit.civInfo.placeUnitNearTile(unitTile.position, upgradedUnit.name)!!
newunit.health = unit.health
newunit.promotions = unit.promotions
for (promotion in newunit.baseUnit.promotions)
if (promotion !in newunit.promotions.promotions)
newunit.promotions.addPromotion(promotion, true)
newunit.updateUniques()
newunit.updateVisibleTiles()
newunit.currentMovement = 0f
worldScreen.shouldUpdate = true
})
}
private fun addWorkerActions(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo, worldScreen: WorldScreen, unitTable: UnitTable) {
if (!unit.hasUnique("Can build improvements on tiles") || unit.isEmbarked()) return
actionList += UnitAction(
type = UnitActionType.ConstructImprovement,
canAct = unit.currentMovement > 0
&& !tile.isCityCenter()
&& unit.civInfo.gameInfo.ruleSet.tileImprovements.values.any { tile.canBuildImprovement(it, unit.civInfo) },
isCurrentAction = unit.currentTile.hasImprovementInProgress(),
action = {
worldScreen.game.setScreen(ImprovementPickerScreen(tile) { unitTable.selectedUnit = null })
})
if (Constants.unitActionAutomation == unit.action) {
actionList += UnitAction(
type = UnitActionType.StopAutomation,
canAct = true,
action = { unit.action = null }
)
} else {
actionList += UnitAction(
type = UnitActionType.Automate,
canAct = unit.currentMovement > 0,
action = {
unit.action = Constants.unitActionAutomation
WorkerAutomation(unit).automateWorkerAction()
})
}
}
private fun addGreatPersonActions(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo) {
for (unique in unit.getUniques().filter { it.startsWith("Can build improvement: ") }) {
val improvementName = unique.replace("Can build improvement: ", "")
actionList += UnitAction(
@ -274,8 +312,8 @@ class UnitActions {
if (unit.name == "Great Merchant" && !unit.isEmbarked()) {
val canConductTradeMission = tile.owningCity?.civInfo?.isCityState() == true
&& tile.owningCity?.civInfo?.isAtWarWith(unit.civInfo) == false
&& unit.currentMovement > 0
&& tile.owningCity?.civInfo?.isAtWarWith(unit.civInfo) == false
&& unit.currentMovement > 0
actionList += UnitAction(
type = UnitActionType.ConductTradeMission,
canAct = canConductTradeMission,
@ -293,18 +331,6 @@ class UnitActions {
unit.destroy()
})
}
actionList += UnitAction(
type = UnitActionType.DisbandUnit,
canAct = unit.currentMovement > 0,
action = {
val disbandText = if (unit.currentTile.getOwner() == unit.civInfo)
"Disband this unit for [${unit.baseUnit.getDisbandGold()}] gold?".tr()
else "Do you really want to disband this unit?".tr()
YesNoPopup(disbandText, { unit.disband(); worldScreen.shouldUpdate = true }).open()
})
return actionList
}
private fun addFortifyActions(actionList: ArrayList<UnitAction>, unit: MapUnit, unitTable: UnitTable) {