mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-22 02:07:43 +07:00
Fixed Embarkation tutorial
This commit is contained in:
parent
eaa1287653
commit
17c98f9f46
@ -301,10 +301,9 @@
|
||||
|
||||
CanEmbark:[
|
||||
[
|
||||
"Your land units can now embark!",
|
||||
"Siege units are extremely powerful against cities, but need to be Set Up before they can attack.",
|
||||
"Once your siege unit is set up, it can attack from the current tile,",
|
||||
" but once moved to another tile, it will need to be set up again."
|
||||
"Your land units can now embark, allowing them to traverse water tiles!",
|
||||
"Entering or leaving water takes the entire turn.",
|
||||
"Units are defenseless while embarked, so be careful!"
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.game"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 161
|
||||
versionName "2.10.2"
|
||||
versionCode 163
|
||||
versionName "2.10.3"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
@ -82,7 +82,7 @@ class BuildingsTable(private val cityScreen: CityScreen) : Table() {
|
||||
add(specialistBuildingsExpander).row()
|
||||
|
||||
// specialist allocation
|
||||
addSpecialistAllocation(skin, specialistBuildings, cityInfo)
|
||||
addSpecialistAllocation(skin, cityInfo)
|
||||
}
|
||||
|
||||
if (!others.isEmpty()) {
|
||||
@ -96,7 +96,7 @@ class BuildingsTable(private val cityScreen: CityScreen) : Table() {
|
||||
pack()
|
||||
}
|
||||
|
||||
private fun addSpecialistAllocation(skin: Skin, specialistBuildings: MutableList<Building>, cityInfo: CityInfo) {
|
||||
private fun addSpecialistAllocation(skin: Skin, cityInfo: CityInfo) {
|
||||
val specialistAllocationExpander = ExpanderTab("Specialist allocation", skin)
|
||||
specialistAllocationExpander.innerTable.defaults().pad(5f)
|
||||
|
||||
@ -104,17 +104,17 @@ class BuildingsTable(private val cityScreen: CityScreen) : Table() {
|
||||
val currentSpecialists = cityInfo.population.specialists.toHashMap()
|
||||
val maximumSpecialists = cityInfo.population.getMaxSpecialists()
|
||||
|
||||
for (entry in maximumSpecialists.toHashMap()) {
|
||||
if (entry.value == 0f) continue
|
||||
val stat = entry.key
|
||||
for (statToMaximumSpecialist in maximumSpecialists.toHashMap()) {
|
||||
if (statToMaximumSpecialist.value == 0f) continue
|
||||
val stat = statToMaximumSpecialist.key
|
||||
// these two are conflictingly named compared to above...
|
||||
val assignedSpecialists = currentSpecialists[entry.key]!!.toInt()
|
||||
val maxSpecialists = entry.value.toInt()
|
||||
val assignedSpecialists = currentSpecialists[statToMaximumSpecialist.key]!!.toInt()
|
||||
val maxSpecialists = statToMaximumSpecialist.value.toInt()
|
||||
if (assignedSpecialists > 0) {
|
||||
val unassignButton = TextButton("-", skin)
|
||||
unassignButton.label.setFontSize(24)
|
||||
unassignButton.onClick {
|
||||
cityInfo.population.specialists.add(entry.key, -1f)
|
||||
cityInfo.population.specialists.add(statToMaximumSpecialist.key, -1f)
|
||||
cityInfo.cityStats.update()
|
||||
cityScreen.update()
|
||||
}
|
||||
@ -131,7 +131,7 @@ class BuildingsTable(private val cityScreen: CityScreen) : Table() {
|
||||
val assignButton = TextButton("+", skin)
|
||||
assignButton.label.setFontSize(24)
|
||||
assignButton.onClick {
|
||||
cityInfo.population.specialists.add(entry.key, +1f)
|
||||
cityInfo.population.specialists.add(statToMaximumSpecialist.key, +1f)
|
||||
cityInfo.cityStats.update()
|
||||
cityScreen.update()
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
updateCityImage()
|
||||
updateTileColor(isViewable)
|
||||
|
||||
updateResourceImage(isViewable,showResourcesAndImprovements)
|
||||
updateImprovementImage(isViewable,showResourcesAndImprovements)
|
||||
updateResourceImage(showResourcesAndImprovements)
|
||||
updateImprovementImage(showResourcesAndImprovements)
|
||||
|
||||
|
||||
civilianUnitImage = newUnitImage(tileInfo.civilianUnit, civilianUnitImage, isViewable, -20f)
|
||||
@ -272,7 +272,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateImprovementImage(viewable: Boolean, showResourcesAndImprovements: Boolean) {
|
||||
private fun updateImprovementImage(showResourcesAndImprovements: Boolean) {
|
||||
if (improvementImage != null) {
|
||||
improvementImage!!.remove()
|
||||
improvementImage = null
|
||||
@ -293,7 +293,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateResourceImage(viewable: Boolean, showResourcesAndImprovements: Boolean) {
|
||||
private fun updateResourceImage(showResourcesAndImprovements: Boolean) {
|
||||
val shouldDisplayResource = showResourcesAndImprovements
|
||||
&& tileInfo.hasViewableResource(tileInfo.tileMap.gameInfo.getPlayerCivilization())
|
||||
|
||||
@ -365,9 +365,9 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
|
||||
fun showCircle(color: Color) {
|
||||
circleImage.isVisible = true
|
||||
val color = color.cpy()
|
||||
color.a = 0.3f
|
||||
circleImage.color = color
|
||||
val colorCopy = color.cpy()
|
||||
colorCopy.a = 0.3f
|
||||
circleImage.color = colorCopy
|
||||
}
|
||||
|
||||
fun hideCircle() {
|
||||
|
Loading…
Reference in New Issue
Block a user