Resolved #9487 - Hide bomb shelters when nuclear weapons are disabled

This commit is contained in:
yairm210 2025-03-20 16:04:11 +02:00
parent 9094a6db56
commit e532c00e35
4 changed files with 11 additions and 1 deletions

View File

@ -1140,7 +1140,9 @@
"cost": 300,
"maintenance": 1,
"requiredTech": "Telecommunications",
"uniques": ["Population loss from nuclear attacks [-75]% [in this city]","Damage to garrison from nuclear attacks [-75]% [in this city]"]
"uniques": ["Population loss from nuclear attacks [-75]% [in this city]",
"Damage to garrison from nuclear attacks [-75]% [in this city]",
"Only available <when nuclear weapons are enabled> <hidden from users>"]
},
{
"name": "Hubble Space Telescope",

View File

@ -146,6 +146,7 @@ object Conditionals {
UniqueType.ConditionalReligionDisabled -> checkOnGameInfo { !isReligionEnabled() }
UniqueType.ConditionalEspionageEnabled -> checkOnGameInfo { isEspionageEnabled() }
UniqueType.ConditionalEspionageDisabled -> checkOnGameInfo { !isEspionageEnabled() }
UniqueType.ConditionalNuclearWeaponsEnabled -> checkOnGameInfo { gameParameters.nuclearWeaponsEnabled }
UniqueType.ConditionalTech -> checkOnCiv {
val filter = conditional.params[0]
if (filter in gameInfo.ruleset.technologies) tech.isResearched(conditional.params[0]) // fast common case

View File

@ -683,6 +683,7 @@ enum class UniqueType(
ConditionalReligionDisabled("when religion is disabled", UniqueTarget.Conditional),
ConditionalEspionageEnabled("when espionage is enabled", UniqueTarget.Conditional),
ConditionalEspionageDisabled("when espionage is disabled", UniqueTarget.Conditional),
ConditionalNuclearWeaponsEnabled("when nuclear weapons are enabled", UniqueTarget.Conditional),
/////// general conditionals
ConditionalChance("with [amount]% chance", UniqueTarget.Conditional),

View File

@ -1429,6 +1429,7 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
These resources are removed *when work begins* on the construction. Do not confuse with "costs [amount] [stockpiledResource]" (lowercase 'c'), the Unit Action Modifier.
Example: "Costs [3] [Mana]"
This unique's effect can be modified with &lt;(modified by game speed)&gt;
Applicable to: Building, Unit, Improvement
??? example "Unbuildable"
@ -1647,6 +1648,7 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
These resources are removed *when work begins* on the construction. Do not confuse with "costs [amount] [stockpiledResource]" (lowercase 'c'), the Unit Action Modifier.
Example: "Costs [3] [Mana]"
This unique's effect can be modified with &lt;(modified by game speed)&gt;
Applicable to: Building, Unit, Improvement
??? example "Unbuildable"
@ -2410,6 +2412,7 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
These resources are removed *when work begins* on the construction. Do not confuse with "costs [amount] [stockpiledResource]" (lowercase 'c'), the Unit Action Modifier.
Example: "Costs [3] [Mana]"
This unique's effect can be modified with &lt;(modified by game speed)&gt;
Applicable to: Building, Unit, Improvement
??? example "Unbuildable"
@ -2832,6 +2835,9 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
??? example "&lt;when espionage is disabled&gt;"
Applicable to: Conditional
??? example "&lt;when nuclear weapons are enabled&gt;"
Applicable to: Conditional
??? example "&lt;with [amount]% chance&gt;"
Example: "&lt;with [3]% chance&gt;"