diff --git a/android/assets/game.atlas b/android/assets/game.atlas index 1e36ed44ae..21b49d7555 100644 --- a/android/assets/game.atlas +++ b/android/assets/game.atlas @@ -440,7 +440,7 @@ BuildingIcons/Paper Maker index: -1 BuildingIcons/Pentagon rotate: false - xy: 614, 344 + xy: 512, 344 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -797,21 +797,21 @@ ImprovementIcons/Quarry index: -1 ImprovementIcons/Railroad rotate: false - xy: 614, 242 + xy: 512, 242 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileSets/Default/Railroad rotate: false - xy: 614, 242 + xy: 512, 242 size: 100, 100 orig: 100, 100 offset: 0, 0 index: -1 TileSets/FantasyHex/Railroad rotate: false - xy: 614, 242 + xy: 512, 242 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -1028,7 +1028,7 @@ OtherIcons/MenuIcon index: -1 OtherIcons/Pentagon rotate: false - xy: 512, 344 + xy: 614, 344 size: 100, 100 orig: 100, 100 offset: 0, 0 @@ -1742,7 +1742,7 @@ TechIcons/Radio index: -1 TechIcons/Railroad rotate: false - xy: 512, 242 + xy: 614, 242 size: 100, 100 orig: 100, 100 offset: 0, 0 diff --git a/android/assets/game.png b/android/assets/game.png index 00615b4cec..50b330d28e 100644 Binary files a/android/assets/game.png and b/android/assets/game.png differ diff --git a/core/src/com/unciv/models/gamebasics/tech/Technology.kt b/core/src/com/unciv/models/gamebasics/tech/Technology.kt index d51e91301a..ec1bb40022 100644 --- a/core/src/com/unciv/models/gamebasics/tech/Technology.kt +++ b/core/src/com/unciv/models/gamebasics/tech/Technology.kt @@ -1,8 +1,11 @@ package com.unciv.models.gamebasics.tech import com.unciv.UnCivGame +import com.unciv.logic.civilization.CivilizationInfo +import com.unciv.models.gamebasics.Building import com.unciv.models.gamebasics.GameBasics import com.unciv.models.gamebasics.tr +import com.unciv.models.gamebasics.unit.BaseUnit import java.util.* class Technology { @@ -30,30 +33,22 @@ class Technology { } val viewingCiv = UnCivGame.Current.worldScreen.viewingCiv - var enabledUnits = GameBasics.Units.values.filter { - it.requiredTech == name && - (it.uniqueTo == null || it.uniqueTo == viewingCiv.civName) - } - val replacedUnits = enabledUnits.mapNotNull { it.replaces } - enabledUnits = enabledUnits.filter { it.name !in replacedUnits } + val enabledUnits = getEnabledUnits(viewingCiv) if (enabledUnits.isNotEmpty()) { lineList += "{Units enabled}: " for (unit in enabledUnits) lineList += " * " + unit.name.tr() + " (" + unit.getShortDescription() + ")" } - var enabledBuildings = GameBasics.Buildings.values.filter { - it.requiredTech == name && - (it.uniqueTo == null || it.uniqueTo == viewingCiv.civName) - } - val replacedBuildings = enabledBuildings.mapNotNull { it.replaces } - enabledBuildings = enabledBuildings.filter { it.name !in replacedBuildings } + var enabledBuildings = getEnabledBuildings(viewingCiv) + val regularBuildings = enabledBuildings.filter { !it.isWonder && !it.isNationalWonder } if (regularBuildings.isNotEmpty()) { lineList += "{Buildings enabled}: " for (building in regularBuildings) lineList += "* " + building.name.tr() + " (" + building.getShortDescription() + ")" } + val wonders = enabledBuildings.filter { it.isWonder || it.isNationalWonder } if (wonders.isNotEmpty()) { lineList += "{Wonders enabled}: " @@ -71,6 +66,35 @@ class Technology { return lineList.joinToString("\n") { it.tr() } } + private fun getEnabledBuildings(civInfo: CivilizationInfo): List { + var enabledBuildings = GameBasics.Buildings.values.filter { + it.requiredTech == name && + (it.uniqueTo == null || it.uniqueTo == civInfo.civName) + } + val replacedBuildings = enabledBuildings.mapNotNull { it.replaces } + enabledBuildings = enabledBuildings.filter { it.name !in replacedBuildings } + + if (!civInfo.gameInfo.gameParameters.nuclearWeaponEnabled) + enabledBuildings=enabledBuildings.filterNot { it.name=="Manhattan Project" } + + return enabledBuildings + } + + fun getEnabledUnits(civInfo:CivilizationInfo): List { + var enabledUnits = GameBasics.Units.values.filter { + it.requiredTech == name && + (it.uniqueTo == null || it.uniqueTo == civInfo.civName) + } + val replacedUnits = enabledUnits.mapNotNull { it.replaces } + enabledUnits = enabledUnits.filter { it.name !in replacedUnits } + + if (!civInfo.gameInfo.gameParameters.nuclearWeaponEnabled) + enabledUnits=enabledUnits.filterNot { it.uniques.contains("Requires Manhattan Project") } + + + return enabledUnits + } + override fun toString(): String { return name } diff --git a/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt b/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt index fcb240340e..452cdd68d9 100644 --- a/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt @@ -59,6 +59,7 @@ class NewGameScreenOptionsTable(val newGameParameters: GameParameters, val onMul } private fun addNuclearWeaponCheckbox() { + add("HIGHLY EXPERIMENTAL - YOU HAVE BEEN WARNED!".tr()).colspan(2).row() val nuclearWeaponCheckbox = CheckBox("Enable nuclear weapon".tr(), CameraStageBaseScreen.skin) nuclearWeaponCheckbox.isChecked = newGameParameters.nuclearWeaponEnabled nuclearWeaponCheckbox.addListener(object : ChangeListener() { @@ -82,7 +83,6 @@ class NewGameScreenOptionsTable(val newGameParameters: GameParameters, val onMul private fun addIsOnlineMultiplayerCheckbox() { - add("HIGHLY EXPERIMENTAL - YOU HAVE BEEN WARNED!".tr()).colspan(2).row() val isOnlineMultiplayerCheckbox = CheckBox("Online Multiplayer".tr(), CameraStageBaseScreen.skin) isOnlineMultiplayerCheckbox.isChecked = newGameParameters.isOnlineMultiplayer isOnlineMultiplayerCheckbox.addListener(object : ChangeListener() { diff --git a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt index 6d1ffffa2d..558b6fbc51 100644 --- a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt +++ b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt @@ -93,7 +93,6 @@ class WorldScreenMenuTable(val worldScreen: WorldScreen) : PopupTable(worldScree close() val multiplayerPopup = PopupTable(screen) - multiplayerPopup.addGoodSizedLabel("HIGHLY EXPERIMENTAL - YOU HAVE BEEN WARNED!").row() multiplayerPopup.addGoodSizedLabel("To create a multiplayer game, check the 'multiplayer' toggle in the New Game screen, and for each human player insert that player's user ID.").row() multiplayerPopup.addGoodSizedLabel("You can assign your own user ID there easily, and other players can copy their user IDs here and send them to you for you to include them in the game.").row()