Skip to content

Commit e532c00

Browse files
committed
Resolved #9487 - Hide bomb shelters when nuclear weapons are disabled
1 parent 9094a6d commit e532c00

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

android/assets/jsons/Civ V - Gods & Kings/Buildings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,9 @@
11401140
"cost": 300,
11411141
"maintenance": 1,
11421142
"requiredTech": "Telecommunications",
1143-
"uniques": ["Population loss from nuclear attacks [-75]% [in this city]","Damage to garrison from nuclear attacks [-75]% [in this city]"]
1143+
"uniques": ["Population loss from nuclear attacks [-75]% [in this city]",
1144+
"Damage to garrison from nuclear attacks [-75]% [in this city]",
1145+
"Only available <when nuclear weapons are enabled> <hidden from users>"]
11441146
},
11451147
{
11461148
"name": "Hubble Space Telescope",

core/src/com/unciv/models/ruleset/unique/Conditionals.kt

+1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ object Conditionals {
146146
UniqueType.ConditionalReligionDisabled -> checkOnGameInfo { !isReligionEnabled() }
147147
UniqueType.ConditionalEspionageEnabled -> checkOnGameInfo { isEspionageEnabled() }
148148
UniqueType.ConditionalEspionageDisabled -> checkOnGameInfo { !isEspionageEnabled() }
149+
UniqueType.ConditionalNuclearWeaponsEnabled -> checkOnGameInfo { gameParameters.nuclearWeaponsEnabled }
149150
UniqueType.ConditionalTech -> checkOnCiv {
150151
val filter = conditional.params[0]
151152
if (filter in gameInfo.ruleset.technologies) tech.isResearched(conditional.params[0]) // fast common case

core/src/com/unciv/models/ruleset/unique/UniqueType.kt

+1
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ enum class UniqueType(
683683
ConditionalReligionDisabled("when religion is disabled", UniqueTarget.Conditional),
684684
ConditionalEspionageEnabled("when espionage is enabled", UniqueTarget.Conditional),
685685
ConditionalEspionageDisabled("when espionage is disabled", UniqueTarget.Conditional),
686+
ConditionalNuclearWeaponsEnabled("when nuclear weapons are enabled", UniqueTarget.Conditional),
686687

687688
/////// general conditionals
688689
ConditionalChance("with [amount]% chance", UniqueTarget.Conditional),

docs/Modders/uniques.md

+6
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,7 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
14291429
These resources are removed *when work begins* on the construction. Do not confuse with "costs [amount] [stockpiledResource]" (lowercase 'c'), the Unit Action Modifier.
14301430
Example: "Costs [3] [Mana]"
14311431

1432+
This unique's effect can be modified with &lt;(modified by game speed)&gt;
14321433
Applicable to: Building, Unit, Improvement
14331434

14341435
??? example "Unbuildable"
@@ -1647,6 +1648,7 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
16471648
These resources are removed *when work begins* on the construction. Do not confuse with "costs [amount] [stockpiledResource]" (lowercase 'c'), the Unit Action Modifier.
16481649
Example: "Costs [3] [Mana]"
16491650

1651+
This unique's effect can be modified with &lt;(modified by game speed)&gt;
16501652
Applicable to: Building, Unit, Improvement
16511653

16521654
??? example "Unbuildable"
@@ -2410,6 +2412,7 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
24102412
These resources are removed *when work begins* on the construction. Do not confuse with "costs [amount] [stockpiledResource]" (lowercase 'c'), the Unit Action Modifier.
24112413
Example: "Costs [3] [Mana]"
24122414

2415+
This unique's effect can be modified with &lt;(modified by game speed)&gt;
24132416
Applicable to: Building, Unit, Improvement
24142417

24152418
??? example "Unbuildable"
@@ -2832,6 +2835,9 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
28322835
??? example "&lt;when espionage is disabled&gt;"
28332836
Applicable to: Conditional
28342837

2838+
??? example "&lt;when nuclear weapons are enabled&gt;"
2839+
Applicable to: Conditional
2840+
28352841
??? example "&lt;with [amount]% chance&gt;"
28362842
Example: "&lt;with [3]% chance&gt;"
28372843

0 commit comments

Comments
 (0)