diff --git a/core/src/com/unciv/GameStarter.kt b/core/src/com/unciv/GameStarter.kt index eb8c30db53..28272949a5 100644 --- a/core/src/com/unciv/GameStarter.kt +++ b/core/src/com/unciv/GameStarter.kt @@ -15,7 +15,6 @@ import kotlin.math.min class GameParameters{ var difficulty="Prince" - var nation="Babylon" var mapRadius=20 var numberOfHumanPlayers=1 var humanNations=ArrayList().apply { add("Babylon") } diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index d2d78b4689..5b70ae75d2 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -12,7 +12,7 @@ import com.unciv.ui.utils.getRandom class GameInfo { var civilizations = mutableListOf() - var difficulty="Chieftain" // difficulty is game-wide, think what would happen if 2 human players could play on diffferent difficulties? + var difficulty="Chieftain" // difficulty is game-wide, think what would happen if 2 human players could play on different difficulties? var tileMap: TileMap = TileMap() var gameParameters=GameParameters() var turns = 0 diff --git a/core/src/com/unciv/logic/civilization/TechManager.kt b/core/src/com/unciv/logic/civilization/TechManager.kt index 18ac527b06..f91d51bc2b 100644 --- a/core/src/com/unciv/logic/civilization/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/TechManager.kt @@ -73,7 +73,10 @@ class TechManager { while (!checkPrerequisites.isEmpty()) { val techNameToCheck = checkPrerequisites.pop() - if (isResearched(techNameToCheck) || prerequisites.contains(techNameToCheck)) + // future tech can have been researched even when we're researching it, + // so...if we skip it we'll end up with 0 techs in the "required techs", which will mean that we don't have annything to research. Yeah. + if (techNameToCheck!="Future Tech" && + (isResearched(techNameToCheck) || prerequisites.contains(techNameToCheck)) ) continue //no need to add or check prerequisites val techToCheck = GameBasics.Technologies[techNameToCheck] for (str in techToCheck!!.prerequisites) diff --git a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt index d5b227f9f4..589997e2b3 100644 --- a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt @@ -9,7 +9,6 @@ import com.unciv.models.gamebasics.GameBasics import com.unciv.models.gamebasics.tech.Technology import com.unciv.models.gamebasics.tr import com.unciv.ui.utils.* -import com.unciv.ui.worldscreen.optionstable.PopupTable import java.util.* import kotlin.collections.HashSet @@ -69,18 +68,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen() val techButton = TechButton(tech.name,civTech) techNameToButton[tech.name] = techButton - techButton.onClick { - try { - selectTechnology(tech) - }catch (ex:Exception){ - val popup = PopupTable(this) - popup.addGoodSizedLabel("You've encountered an error that I've been trying to pin down for a while.").row() - popup.addGoodSizedLabel("If you could copy your game data (menu-save game-copy to clipboard - paste into an email to yairm210@hotmail.com)").row() - popup.addGoodSizedLabel("That would be really helpful to me, thanks!").row() - popup.addGoodSizedLabel("If you also add what tech you clicked on to get this error that would be even better!").row() - popup.open() - } - } + techButton.onClick { selectTechnology(tech) } topTable.add(techButton) } } diff --git a/core/src/com/unciv/ui/saves/LoadScreen.kt b/core/src/com/unciv/ui/saves/LoadScreen.kt index 8f0a8b8af7..004318d5cc 100644 --- a/core/src/com/unciv/ui/saves/LoadScreen.kt +++ b/core/src/com/unciv/ui/saves/LoadScreen.kt @@ -4,7 +4,6 @@ import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextButton -import com.badlogic.gdx.utils.Json import com.unciv.UnCivGame import com.unciv.logic.GameInfo import com.unciv.logic.GameSaver @@ -69,7 +68,7 @@ class LoadScreen : PickerScreen() { try{ val clipboardContentsString = Gdx.app.clipboard.contents.trim() val decoded = Gzip.unzip(clipboardContentsString) - val loadedGame = Json().fromJson(GameInfo::class.java, decoded) + val loadedGame = GameSaver().json().fromJson(GameInfo::class.java, decoded) loadedGame.setTransients() UnCivGame.Current.loadGame(loadedGame) }catch (ex:Exception){