diff --git a/core/src/com/unciv/logic/BackwardCompatibility.kt b/core/src/com/unciv/logic/BackwardCompatibility.kt index cb5ae7ca23..f39c03789d 100644 --- a/core/src/com/unciv/logic/BackwardCompatibility.kt +++ b/core/src/com/unciv/logic/BackwardCompatibility.kt @@ -142,10 +142,6 @@ object BackwardCompatibility { /** Move max XP from barbarians to new home */ @Suppress("DEPRECATION") fun ModOptions.updateDeprecations() { - if (maxXPfromBarbarians != 30) { - constants.maxXPfromBarbarians = maxXPfromBarbarians - maxXPfromBarbarians = 30 - } } @@ -175,14 +171,6 @@ object BackwardCompatibility { return false } - @Suppress("DEPRECATION") - fun GameInfo.convertOldGameSpeed() { - if (gameParameters.gameSpeed != "" && gameParameters.gameSpeed in ruleset.speeds.keys) { - gameParameters.speed = gameParameters.gameSpeed - gameParameters.gameSpeed = "" - } - } - fun GameInfo.migrateToTileHistory() { if (historyStartTurn >= 0) return for (tile in getCities().flatMap { it.getTiles() }) { diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index a223dcfbbe..4940d4d62a 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -4,7 +4,6 @@ import com.unciv.Constants import com.unciv.UncivGame import com.unciv.UncivGame.Version import com.unciv.logic.BackwardCompatibility.convertFortify -import com.unciv.logic.BackwardCompatibility.convertOldGameSpeed import com.unciv.logic.BackwardCompatibility.guaranteeUnitPromotions import com.unciv.logic.BackwardCompatibility.migrateToTileHistory import com.unciv.logic.BackwardCompatibility.removeMissingModReferences @@ -509,8 +508,6 @@ class GameInfo : IsPartOfGameInfoSerialization, HasGameInfoSerializationVersion removeMissingModReferences() - convertOldGameSpeed() - for (baseUnit in ruleset.units.values) baseUnit.ruleset = ruleset @@ -586,10 +583,6 @@ class GameInfo : IsPartOfGameInfoSerialization, HasGameInfoSerializationVersion cityInfo.cityStats.update() } - - if (civInfo.hasEverOwnedOriginalCapital == null) { - civInfo.hasEverOwnedOriginalCapital = civInfo.cities.any { it.isOriginalCapital } - } } spaceResources.clear() diff --git a/core/src/com/unciv/logic/civilization/Civilization.kt b/core/src/com/unciv/logic/civilization/Civilization.kt index 749321f88b..969ea38cb7 100644 --- a/core/src/com/unciv/logic/civilization/Civilization.kt +++ b/core/src/com/unciv/logic/civilization/Civilization.kt @@ -195,10 +195,7 @@ class Civilization : IsPartOfGameInfoSerialization { var lastSeenImprovement = HashMapVector2() // To correctly determine "game over" condition as clarified in #4707 - // Nullable type meant to be deprecated and converted to non-nullable, - // default false once we no longer want legacy save-game compatibility - // This parameter means they owned THEIR OWN capital btw, not other civs'. - var hasEverOwnedOriginalCapital: Boolean? = null + var hasEverOwnedOriginalCapital: Boolean = false val passableImpassables = HashSet() // For Carthage-like uniques diff --git a/core/src/com/unciv/models/metadata/GameParameters.kt b/core/src/com/unciv/models/metadata/GameParameters.kt index 5261fd4207..a4451f969e 100644 --- a/core/src/com/unciv/models/metadata/GameParameters.kt +++ b/core/src/com/unciv/models/metadata/GameParameters.kt @@ -15,8 +15,6 @@ class GameParameters : IsPartOfGameInfoSerialization { // Default values are the var difficulty = "Prince" var speed = Speed.DEFAULT - @Deprecated("Since 4.1.11") - var gameSpeed = "" var randomNumberOfPlayers = false var minNumberOfPlayers = 3 var maxNumberOfPlayers = 3 diff --git a/core/src/com/unciv/models/ruleset/Ruleset.kt b/core/src/com/unciv/models/ruleset/Ruleset.kt index 9a76497ab7..51c81879fc 100644 --- a/core/src/com/unciv/models/ruleset/Ruleset.kt +++ b/core/src/com/unciv/models/ruleset/Ruleset.kt @@ -59,9 +59,6 @@ class ModOptions : IHasUniques { var modSize = 0 var topics = mutableListOf() - @Deprecated("As of 3.18.15") - var maxXPfromBarbarians = 30 - override var uniques = ArrayList() // If these two are delegated with "by lazy", the mod download process crashes and burns diff --git a/core/src/com/unciv/models/ruleset/RulesetValidator.kt b/core/src/com/unciv/models/ruleset/RulesetValidator.kt index 190a13d45f..61a3c78abb 100644 --- a/core/src/com/unciv/models/ruleset/RulesetValidator.kt +++ b/core/src/com/unciv/models/ruleset/RulesetValidator.kt @@ -413,11 +413,6 @@ class RulesetValidator(val ruleset: Ruleset) { } } - @Suppress("DEPRECATION") - if (ruleset.modOptions.maxXPfromBarbarians != 30) { - lines.add("maxXPfromBarbarians is moved to the constants object, instead use: \nconstants: {\n maxXPfromBarbarians: ${ruleset.modOptions.maxXPfromBarbarians},\n}", RulesetErrorSeverity.Warning) - } - return lines } diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt index 08e28c436e..2954053b44 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueParameterType.kt @@ -235,19 +235,6 @@ enum class UniqueParameterType( parameterText != "All" && getErrorSeverity(parameterText, ruleset) == null }, - /** [UniqueType.PercentProductionConstructions], [UniqueType.PercentProductionConstructionsCities] */ - @Deprecated("as of 3.17.10 - removed 3.18.5") - ConstructionFilter("constructionFilter", "Spaceship Part") { - override fun getErrorSeverity( - parameterText: String, - ruleset: Ruleset - ): UniqueType.UniqueComplianceErrorSeverity? { - if (BuildingFilter.getErrorSeverity(parameterText, ruleset) == null) return null - if (BaseUnitFilter.getErrorSeverity(parameterText, ruleset) == null) return null - return UniqueType.UniqueComplianceErrorSeverity.WarningOnly - } - }, - /** Implemented by [PopulationManager.getPopulationFilterAmount][com.unciv.logic.city.CityPopulationManager.getPopulationFilterAmount] */ PopulationFilter("populationFilter", "Followers of this Religion", null, "Population Filters") { private val knownValues = setOf("Population", "Specialists", "Unemployed", "Followers of the Majority Religion", "Followers of this Religion") diff --git a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt index 76723f0e6f..437b728b34 100644 --- a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt +++ b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt @@ -15,8 +15,8 @@ import com.unciv.models.stats.Stat import com.unciv.ui.components.extensions.filterAndLogic import com.unciv.ui.components.extensions.getNeedMoreAmountString import com.unciv.ui.components.extensions.toPercent -import com.unciv.ui.screens.civilopediascreen.FormattedLine import com.unciv.ui.objectdescriptions.BaseUnitDescriptions +import com.unciv.ui.screens.civilopediascreen.FormattedLine import kotlin.math.pow // This is BaseUnit because Unit is already a base Kotlin class and to avoid mixing the two up @@ -293,8 +293,7 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction { "non-air" -> !movesLikeAirUnits() "Nuclear Weapon" -> isNuclearWeapon() - // "Great" should be deprecated, replaced by "Great Person". - "Great Person", "Great" -> isGreatPerson() + "Great Person" -> isGreatPerson() "Religious" -> hasUnique(UniqueType.ReligiousUnit) else -> { if (getType().matchesFilter(filter)) return true diff --git a/tests/src/com/unciv/testing/BasicTests.kt b/tests/src/com/unciv/testing/BasicTests.kt index 954c929f32..00ac049d19 100644 --- a/tests/src/com/unciv/testing/BasicTests.kt +++ b/tests/src/com/unciv/testing/BasicTests.kt @@ -104,6 +104,7 @@ class BasicTests { fun uniqueTypesHaveNoUnknownParameters() { var noUnknownParameters = true for (uniqueType in UniqueType.values()) { + if (uniqueType.getDeprecationAnnotation()!=null) continue for (entry in uniqueType.parameterTypeMap.withIndex()) { for (paramType in entry.value) { if (paramType == UniqueParameterType.Unknown) {