mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
Icons for units replaced by civ unique units are no longer shown in tech button
This commit is contained in:
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 223
|
||||
versionName "2.14.3"
|
||||
versionCode 224
|
||||
versionName "2.14.4"
|
||||
}
|
||||
|
||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||
|
@ -16,7 +16,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
|
||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||
classpath 'com.android.tools.build:gradle:3.3.2'
|
||||
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1'
|
||||
}
|
||||
}
|
||||
|
@ -34,8 +34,13 @@ class TechButton(techName:String, val techManager: TechManager) : Table(CameraSt
|
||||
val techEnabledIcons = Table()
|
||||
techEnabledIcons.defaults().pad(5f)
|
||||
|
||||
for(unit in GameBasics.Units.values.filter { it.requiredTech==techName
|
||||
&& (it.uniqueTo==null || it.uniqueTo==techManager.civInfo.civName) })
|
||||
val techEnabledUnits = GameBasics.Units.values.filter { it.requiredTech==techName }
|
||||
val ourUniqueUnits = techEnabledUnits.filter { it.uniqueTo == techManager.civInfo.civName }
|
||||
val replacedUnits = ourUniqueUnits.map { it.replaces!! }
|
||||
val ourEnabledUnits = techEnabledUnits.filter { it.uniqueTo == null && !replacedUnits.contains(it.name) }
|
||||
.union(ourUniqueUnits)
|
||||
|
||||
for(unit in ourEnabledUnits)
|
||||
techEnabledIcons.add(ImageGetter.getConstructionImage(unit.name).surroundWithCircle(30f))
|
||||
|
||||
for(building in GameBasics.Buildings.values.filter { it.requiredTech==techName
|
||||
|
Reference in New Issue
Block a user