Resolved #595 - Added release version to options table
This commit is contained in:
parent
1dc6a2cf2d
commit
69d3703543
8 changed files with 10 additions and 8 deletions
|
@ -11,6 +11,7 @@ public class AndroidLauncher extends AndroidApplication {
|
|||
protected void onCreate (Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||
initialize(new UnCivGame(), config);
|
||||
String version = BuildConfig.VERSION_NAME;
|
||||
initialize(new UnCivGame(version), config);
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ import com.unciv.ui.LanguagePickerScreen
|
|||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.worldscreen.WorldScreen
|
||||
|
||||
class UnCivGame : Game() {
|
||||
class UnCivGame(val version: String) : Game() {
|
||||
var gameInfo: GameInfo = GameInfo()
|
||||
lateinit var settings : GameSettings
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class Automation {
|
|||
&& cityInfo.getTiles().any { it.isWater() && it.hasViewableResource(cityInfo.civInfo) && it.improvement == null }
|
||||
|
||||
val isAtWar = cityInfo.civInfo.isAtWar()
|
||||
val cityProduction = cityInfo.cityStats.currentCityStats.production.toFloat()
|
||||
val cityProduction = cityInfo.cityStats.currentCityStats.production
|
||||
|
||||
var buildingValues = HashMap<String, Float>()
|
||||
//Food buildings : Granary and lighthouse and hospital
|
||||
|
@ -136,7 +136,7 @@ class Automation {
|
|||
//Wonders
|
||||
if (buildableWonders.isNotEmpty()) {
|
||||
val citiesBuildingWonders = cityInfo.civInfo.cities
|
||||
.filter { it.cityConstructions.isBuildingWonder() }.size
|
||||
.count { it.cityConstructions.isBuildingWonder() }
|
||||
val wonder = buildableWonders.getRandom()
|
||||
buildingValues[wonder.name] = wonder.cost / cityProduction * (citiesBuildingWonders + 1) / 5.0f
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Button
|
|||
import com.unciv.UnCivGame
|
||||
import com.unciv.logic.civilization.GreatPersonManager
|
||||
import com.unciv.models.gamebasics.GameBasics
|
||||
import com.unciv.models.gamebasics.tr
|
||||
import com.unciv.models.gamebasics.unit.BaseUnit
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
import com.unciv.ui.utils.onClick
|
||||
|
|
|
@ -68,7 +68,6 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski
|
|||
}
|
||||
pack()
|
||||
setOrigin(Align.center)
|
||||
toFront()
|
||||
touchable = Touchable.enabled
|
||||
|
||||
}
|
||||
|
|
|
@ -60,6 +60,9 @@ class WorldScreenOptionsTable(screen:WorldScreen) : PopupTable(screen){
|
|||
|
||||
addSoundEffectsVolumeSlider()
|
||||
|
||||
add("Version".toLabel())
|
||||
add(UnCivGame.Current.version.toLabel()).row()
|
||||
|
||||
addButton("Close"){ remove() }
|
||||
|
||||
pack() // Needed to show the background.
|
||||
|
|
|
@ -20,6 +20,6 @@ class DesktopLauncher {
|
|||
TexturePacker.process(settings, "../images", ".", "game");
|
||||
|
||||
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
|
||||
new LwjglApplication(new UnCivGame(), config);
|
||||
new LwjglApplication(new UnCivGame("Desktop"), config);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class IOSLauncher extends IOSApplication.Delegate {
|
|||
@Override
|
||||
protected IOSApplication createApplication() {
|
||||
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
|
||||
return new IOSApplication(new com.unciv.UnCivGame(), config);
|
||||
return new IOSApplication(new com.unciv.UnCivGame("IOS"), config);
|
||||
}
|
||||
|
||||
public static void main(String[] argv) {
|
Loading…
Reference in a new issue