From ab7f23835e49bda56d7d7a7121d23d8fb1b06b27 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 25 Jan 2024 21:58:49 +0200 Subject: [PATCH] Enum rename: OnlyAvailableWhen -> OnlyAvailable --- .../logic/automation/civilization/ReligionAutomation.kt | 2 +- core/src/com/unciv/logic/automation/unit/UnitAutomation.kt | 4 ++-- .../com/unciv/logic/civilization/managers/PolicyManager.kt | 4 ++-- .../com/unciv/logic/civilization/managers/RuinsManager.kt | 2 +- .../com/unciv/logic/civilization/managers/TechManager.kt | 2 +- core/src/com/unciv/logic/map/mapunit/UnitPromotions.kt | 2 +- .../unciv/logic/map/tile/TileInfoImprovementFunctions.kt | 4 ++-- core/src/com/unciv/models/ruleset/Building.kt | 4 ++-- core/src/com/unciv/models/ruleset/Policy.kt | 6 +++--- core/src/com/unciv/models/ruleset/tech/Era.kt | 2 +- core/src/com/unciv/models/ruleset/tech/Technology.kt | 2 +- core/src/com/unciv/models/ruleset/unique/IHasUniques.kt | 2 +- core/src/com/unciv/models/ruleset/unique/UniqueType.kt | 2 +- core/src/com/unciv/models/ruleset/unit/BaseUnit.kt | 2 +- .../unciv/ui/screens/pickerscreens/PantheonPickerScreen.kt | 2 +- .../unciv/ui/screens/pickerscreens/PolicyPickerScreen.kt | 6 +++--- .../src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt | 6 +++--- .../screens/pickerscreens/ReligiousBeliefsPickerScreen.kt | 2 +- .../com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt | 2 +- .../worldscreen/unit/actions/UnitActionsFromUniques.kt | 2 +- 20 files changed, 30 insertions(+), 30 deletions(-) diff --git a/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt b/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt index 930e928fc1..a674cc1a89 100644 --- a/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt +++ b/core/src/com/unciv/logic/automation/civilization/ReligionAutomation.kt @@ -470,7 +470,7 @@ object ReligionAutomation { (it.type == beliefType || beliefType == BeliefType.Any) && !additionalBeliefsToExclude.contains(it) && civInfo.religionManager.getReligionWithBelief(it) == null - && it.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + && it.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .none { unique -> !unique.conditionalsApply(civInfo) } } .maxByOrNull { ReligionAutomation.rateBelief(civInfo, it) } diff --git a/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt b/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt index 2c6cf2d295..7d8bae19b6 100644 --- a/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/unit/UnitAutomation.kt @@ -129,7 +129,7 @@ object UnitAutomation { internal fun tryUpgradeUnit(unit: MapUnit): Boolean { if (unit.civ.isHuman() && (!UncivGame.Current.settings.automatedUnitsCanUpgrade || UncivGame.Current.settings.autoPlay.isAutoPlayingAndFullAI())) return false - + val upgradeUnits = getUnitsToUpgradeTo(unit) if (upgradeUnits.none()) return false // for resource reasons, usually val upgradedUnit = upgradeUnits.minBy { it.cost } @@ -153,7 +153,7 @@ object UnitAutomation { fun isInvalidUpgradeDestination(baseUnit: BaseUnit): Boolean { if (!unit.civ.tech.isResearched(baseUnit)) return true - return baseUnit.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + return baseUnit.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .any { !it.conditionalsApply(StateForConditionals(unit.civ, unit = unit)) } } diff --git a/core/src/com/unciv/logic/civilization/managers/PolicyManager.kt b/core/src/com/unciv/logic/civilization/managers/PolicyManager.kt index 83cf7b7a50..31a3e69876 100644 --- a/core/src/com/unciv/logic/civilization/managers/PolicyManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/PolicyManager.kt @@ -166,7 +166,7 @@ class PolicyManager : IsPartOfGameInfoSerialization { if (policy.policyBranchType == PolicyBranchType.BranchComplete) return false if (!getAdoptedPolicies().containsAll(policy.requires!!)) return false if (checkEra && civInfo.gameInfo.ruleset.eras[policy.branch.era]!!.eraNumber > civInfo.getEraNumber()) return false - if (policy.uniqueObjects.filter { it.type == UniqueType.OnlyAvailableWhen } + if (policy.uniqueObjects.filter { it.type == UniqueType.OnlyAvailable } .any { !it.conditionalsApply(civInfo) }) return false return true } @@ -256,7 +256,7 @@ class PolicyManager : IsPartOfGameInfoSerialization { } } - + fun getCultureFromGreatWriter(): Int { return (cultureOfLast8Turns.sum() * civInfo.gameInfo.speed.cultureCostModifier).toInt() } diff --git a/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt b/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt index 53fc123529..c3b84e65dd 100644 --- a/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt @@ -40,7 +40,7 @@ class RuinsManager( || civInfo.gameInfo.difficulty in possibleReward.excludedDifficulties || possibleReward.hasUnique(UniqueType.HiddenWithoutReligion) && !civInfo.gameInfo.isReligionEnabled() || possibleReward.hasUnique(UniqueType.HiddenAfterGreatProphet) && civInfo.religionManager.greatProphetsEarned() > 0 - || possibleReward.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + || possibleReward.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .any { !it.conditionalsApply(stateForOnlyAvailableWhen) } } // This might be a dirty way to do this, but it works (we do have randomWeighted in CollectionExtensions, but below we diff --git a/core/src/com/unciv/logic/civilization/managers/TechManager.kt b/core/src/com/unciv/logic/civilization/managers/TechManager.kt index bfba17a062..7c0e3f2aeb 100644 --- a/core/src/com/unciv/logic/civilization/managers/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/TechManager.kt @@ -161,7 +161,7 @@ class TechManager : IsPartOfGameInfoSerialization { fun canBeResearched(techName: String): Boolean { val tech = getRuleset().technologies[techName]!! - if (tech.uniqueObjects.any { it.type == UniqueType.OnlyAvailableWhen && !it.conditionalsApply(civInfo) }) + if (tech.uniqueObjects.any { it.type == UniqueType.OnlyAvailable && !it.conditionalsApply(civInfo) }) return false if (isResearched(tech.name) && !tech.isContinuallyResearchable()) diff --git a/core/src/com/unciv/logic/map/mapunit/UnitPromotions.kt b/core/src/com/unciv/logic/map/mapunit/UnitPromotions.kt index c9c6602269..895cf68021 100644 --- a/core/src/com/unciv/logic/map/mapunit/UnitPromotions.kt +++ b/core/src/com/unciv/logic/map/mapunit/UnitPromotions.kt @@ -118,7 +118,7 @@ class UnitPromotions : IsPartOfGameInfoSerialization { .filter { unit.type.name in it.unitTypes && it.name !in promotions } .filter { it.prerequisites.isEmpty() || it.prerequisites.any { p->p in promotions } } .filter { promotion -> promotion.uniqueObjects - .none { it.type == UniqueType.OnlyAvailableWhen + .none { it.type == UniqueType.OnlyAvailable && !it.conditionalsApply(StateForConditionals(unit.civ, unit = unit)) } } } diff --git a/core/src/com/unciv/logic/map/tile/TileInfoImprovementFunctions.kt b/core/src/com/unciv/logic/map/tile/TileInfoImprovementFunctions.kt index 618278bd48..a6a8f2a947 100644 --- a/core/src/com/unciv/logic/map/tile/TileInfoImprovementFunctions.kt +++ b/core/src/com/unciv/logic/map/tile/TileInfoImprovementFunctions.kt @@ -60,7 +60,7 @@ class TileInfoImprovementFunctions(val tile: Tile) { yield(ImprovementBuildingProblem.NotJustOutsideBorders) } - if (improvement.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + if (improvement.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .any { !it.conditionalsApply(stateForConditionals) }) yield(ImprovementBuildingProblem.UnmetConditional) @@ -128,7 +128,7 @@ class TileInfoImprovementFunctions(val tile: Tile) { // Can only remove roads if that road is actually there RoadStatus.values().any { it.removeAction == improvement.name } -> tile.roadStatus.removeAction == improvement.name // Can only remove features or improvement if that feature/improvement is actually there - improvement.name.startsWith(Constants.remove) -> tile.terrainFeatures.any { Constants.remove + it == improvement.name } + improvement.name.startsWith(Constants.remove) -> tile.terrainFeatures.any { Constants.remove + it == improvement.name } || Constants.remove + tile.improvement == improvement.name // Can only build roads if on land and they are better than the current road RoadStatus.values().any { it.name == improvement.name } -> !tile.isWater diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 84aa64c4af..4ab60a5a95 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -241,7 +241,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { yield(RejectionReasonType.AlreadyBuilt.toInstance()) for (unique in uniqueObjects) { - if (unique.type != UniqueType.OnlyAvailableWhen && + if (unique.type != UniqueType.OnlyAvailable && !unique.conditionalsApply(StateForConditionals(civ, cityConstructions.city))) continue @Suppress("NON_EXHAUSTIVE_WHEN") @@ -251,7 +251,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { UniqueType.Unbuildable -> yield(RejectionReasonType.Unbuildable.toInstance()) - UniqueType.OnlyAvailableWhen -> + UniqueType.OnlyAvailable -> if (!unique.conditionalsApply(civ, cityConstructions.city)) yield(RejectionReasonType.ShouldNotBeDisplayed.toInstance()) diff --git a/core/src/com/unciv/models/ruleset/Policy.kt b/core/src/com/unciv/models/ruleset/Policy.kt index 51472d7b74..1db07a357c 100644 --- a/core/src/com/unciv/models/ruleset/Policy.kt +++ b/core/src/com/unciv/models/ruleset/Policy.kt @@ -38,7 +38,7 @@ open class Policy : RulesetObject() { return (if (policyBranchType == PolicyBranchType.Member) name.tr() + "\n" else "") + uniqueObjects.filterNot { it.isHiddenToUsers() - || it.isOfType(UniqueType.OnlyAvailableWhen) + || it.isOfType(UniqueType.OnlyAvailable) || it.isOfType(UniqueType.OneTimeGlobalAlert) } .joinToString("\n") { "• ${it.text.tr()}" } @@ -91,7 +91,7 @@ open class Policy : RulesetObject() { } fun isEnabledByPolicy(rulesetObject: IRulesetObject) = - rulesetObject.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals).any { it.conditionals.any { + rulesetObject.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals).any { it.conditionals.any { it.type == UniqueType.ConditionalAfterPolicyOrBelief && it.params[0] == name } } @@ -108,7 +108,7 @@ open class Policy : RulesetObject() { fun isDisabledByPolicy(rulesetObject: IRulesetObject) = - rulesetObject.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals).any { it.conditionals.any { + rulesetObject.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals).any { it.conditionals.any { it.type == UniqueType.ConditionalBeforePolicyOrBelief && it.params[0] == name } } diff --git a/core/src/com/unciv/models/ruleset/tech/Era.kt b/core/src/com/unciv/models/ruleset/tech/Era.kt index ac6467234c..e8318c279f 100644 --- a/core/src/com/unciv/models/ruleset/tech/Era.kt +++ b/core/src/com/unciv/models/ruleset/tech/Era.kt @@ -72,7 +72,7 @@ class Era : RulesetObject() { ruleset.allRulesetObjects() .flatMap { obj -> obj.getMatchingUniques( - UniqueType.OnlyAvailableWhen, + UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals ) .map { unique -> obj to unique } diff --git a/core/src/com/unciv/models/ruleset/tech/Technology.kt b/core/src/com/unciv/models/ruleset/tech/Technology.kt index d01d002d92..c165d85127 100644 --- a/core/src/com/unciv/models/ruleset/tech/Technology.kt +++ b/core/src/com/unciv/models/ruleset/tech/Technology.kt @@ -43,7 +43,7 @@ class Technology: RulesetObject() { // Wrapper so that if the way to require a tech with a Unique ever changes, this only needs to change in one place. fun uniqueIsRequirementForThisTech(unique: Unique): Boolean = - unique.type == UniqueType.OnlyAvailableWhen + unique.type == UniqueType.OnlyAvailable // OnlyAvailableWhen can take multiple conditionals, in which case the true conditional is implicitly the conjunction of all those conditionals. // If an OnlyAvailableWhen there are multiple conditionals, one of which requires this tech, // then IHasUniques.techsRequiredByUniques() will list this tech as required (because it is), diff --git a/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt b/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt index a20e151444..53bbb0120f 100644 --- a/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt +++ b/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt @@ -47,7 +47,7 @@ interface IHasUniques : INamed { fun hasUnique(uniqueType: UniqueType, stateForConditionals: StateForConditionals? = null) = getMatchingUniques(uniqueType.placeholderText, stateForConditionals).any() - fun availabilityUniques(): Sequence = getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + fun availabilityUniques(): Sequence = getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) fun techsRequiredByUniques(): Sequence { return availabilityUniques() diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index 461bff1294..5b56056043 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -263,7 +263,7 @@ enum class UniqueType( MaxNumberBuildable("Limited to [amount] per Civilization", UniqueTarget.Building, UniqueTarget.Unit), HiddenBeforeAmountPolicies("Hidden until [amount] social policy branches have been completed", UniqueTarget.Building, UniqueTarget.Unit), // Meant to be used together with conditionals, like "Only available " - OnlyAvailableWhen("Only available", UniqueTarget.Unit, UniqueTarget.Building, UniqueTarget.Improvement, + OnlyAvailable("Only available", UniqueTarget.Unit, UniqueTarget.Building, UniqueTarget.Improvement, UniqueTarget.Policy, UniqueTarget.Tech, UniqueTarget.Promotion, UniqueTarget.Ruins, UniqueTarget.FollowerBelief, UniqueTarget.FounderBelief), ConvertFoodToProductionWhenConstructed("Excess Food converted to Production when under construction", UniqueTarget.Building, UniqueTarget.Unit), diff --git a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt index d6d2ad6f93..19ab05fc7c 100644 --- a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt +++ b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt @@ -159,7 +159,7 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction { } val civInfo = cityConstructions.city.civ - for (unique in getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals)) + for (unique in getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals)) if (!unique.conditionalsApply(civInfo, cityConstructions.city)) yield(RejectionReasonType.ShouldNotBeDisplayed.toInstance()) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/PantheonPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/PantheonPickerScreen.kt index 22b53e177a..6b412c8abe 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/PantheonPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/PantheonPickerScreen.kt @@ -20,7 +20,7 @@ class PantheonPickerScreen( if (belief.type != BeliefType.Pantheon) continue val beliefButton = getBeliefButton(belief, withTypeLabel = false) if (choosingCiv.religionManager.getReligionWithBelief(belief) == null - && belief.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + && belief.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .none { !it.conditionalsApply(choosingCiv) }) { beliefButton.onClickSelect(selection, belief) { selectedPantheon = belief diff --git a/core/src/com/unciv/ui/screens/pickerscreens/PolicyPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/PolicyPickerScreen.kt index 5beaabf6c1..6dae540b37 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/PolicyPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/PolicyPickerScreen.kt @@ -300,9 +300,9 @@ class PolicyPickerScreen( label.wrap = true labelTable.add(label).pad(7f, 20f, 10f, 20f).grow().row() - if (branch.uniqueMap.getUniques(UniqueType.OnlyAvailableWhen).any()) { - var warning = UniqueType.OnlyAvailableWhen.text.tr() + ":\n" - for (unique in branch.uniqueMap.getUniques(UniqueType.OnlyAvailableWhen)) + if (branch.uniqueMap.getUniques(UniqueType.OnlyAvailable).any()) { + var warning = UniqueType.OnlyAvailable.text.tr() + ":\n" + for (unique in branch.uniqueMap.getUniques(UniqueType.OnlyAvailable)) for (conditional in unique.conditionals) { warning += "• " + conditional.text.tr() + "\n" } diff --git a/core/src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt b/core/src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt index 72422dec68..6cfd350db1 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/PromotionTree.kt @@ -34,7 +34,7 @@ class PromotionTree(val unit: MapUnit) { /** Off if there is only one "best" path of equal cost to adopt this node's promotion */ var pathIsAmbiguous = false /** On for promotions having unavailable prerequisites (missing in ruleset, or not allowed for the unit's - * UnitType, and not already adopted either); or currently disabled by a [UniqueType.OnlyAvailableWhen] unique. + * UnitType, and not already adopted either); or currently disabled by a [UniqueType.OnlyAvailable] unique. * (should never be on with a vanilla ruleset) */ var unreachable = false @@ -109,7 +109,7 @@ class PromotionTree(val unit: MapUnit) { // defensive - I don't know how to provoke the situation, but if it ever occurs, disallow choosing that promotion if (node.promotion.prerequisites.isNotEmpty() && node.parents.isEmpty()) node.unreachable = true - if (node.promotion.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + if (node.promotion.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .any { !it.conditionalsApply(state) }) node.unreachable = true } @@ -118,7 +118,7 @@ class PromotionTree(val unit: MapUnit) { // Also determine preferredParent / pathIsAmbiguous by weighing distanceToAdopted for (node in allRoots()) { node.depth = 0 - node.distanceToAdopted = if (node.isAdopted) 0 + node.distanceToAdopted = if (node.isAdopted) 0 else if (node.unreachable) Int.MAX_VALUE else 1 } for (depth in 0..99) { diff --git a/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt index c83d14af8d..204671f4d9 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/ReligiousBeliefsPickerScreen.kt @@ -220,7 +220,7 @@ class ReligiousBeliefsPickerScreen ( // The Belief is not available because someone already has it beliefButton.disable(redDisableColor) } - belief.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) + belief.getMatchingUniques(UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals) .any { !it.conditionalsApply(choosingCiv) } -> // The Belief is blocked beliefButton.disable(redDisableColor) diff --git a/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt index 857dbfc1fe..c6f9a65013 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/TechPickerScreen.kt @@ -407,7 +407,7 @@ class TechPickerScreen( val pathToTech = civTech.getRequiredTechsToDestination(tech) for (requiredTech in pathToTech) { for (unique in requiredTech.uniqueObjects - .filter { it.type == UniqueType.OnlyAvailableWhen && !it.conditionalsApply(civInfo) }) { + .filter { it.type == UniqueType.OnlyAvailable && !it.conditionalsApply(civInfo) }) { rightSideButton.setText(unique.text.tr()) rightSideButton.disable() return diff --git a/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsFromUniques.kt b/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsFromUniques.kt index 471ae19a01..7dc27b8208 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsFromUniques.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/unit/actions/UnitActionsFromUniques.kt @@ -305,7 +305,7 @@ object UnitActionsFromUniques { val unitToTransformTo = civInfo.getEquivalentUnit(unique.params[0]) if (unitToTransformTo.getMatchingUniques( - UniqueType.OnlyAvailableWhen, + UniqueType.OnlyAvailable, StateForConditionals.IgnoreConditionals ) .any { !it.conditionalsApply(stateForConditionals) })