mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 01:39:40 +07:00
Added a hidden option for enabling espionage (#7615)
This commit is contained in:
@ -28,6 +28,7 @@ class GameParameters : IsPartOfGameInfoSerialization { // Default values are the
|
|||||||
var nuclearWeaponsEnabled = true
|
var nuclearWeaponsEnabled = true
|
||||||
@Deprecated("As of 4.2.3")
|
@Deprecated("As of 4.2.3")
|
||||||
var religionEnabled = true
|
var religionEnabled = true
|
||||||
|
var espionageEnabled = false
|
||||||
var noStartBias = false
|
var noStartBias = false
|
||||||
|
|
||||||
var victoryTypes: ArrayList<String> = arrayListOf()
|
var victoryTypes: ArrayList<String> = arrayListOf()
|
||||||
|
@ -64,6 +64,7 @@ class GameSettings {
|
|||||||
var multiplayer = GameSettingsMultiplayer()
|
var multiplayer = GameSettingsMultiplayer()
|
||||||
|
|
||||||
var showExperimentalWorldWrap = false // We're keeping this as a config due to ANR problems on Android phones for people who don't know what they're doing :/
|
var showExperimentalWorldWrap = false // We're keeping this as a config due to ANR problems on Android phones for people who don't know what they're doing :/
|
||||||
|
var enableEspionageOption = false
|
||||||
|
|
||||||
var lastOverviewPage: String = "Cities"
|
var lastOverviewPage: String = "Cities"
|
||||||
|
|
||||||
|
@ -70,6 +70,8 @@ class GameOptionsTable(
|
|||||||
checkboxTable.addOneCityChallengeCheckbox()
|
checkboxTable.addOneCityChallengeCheckbox()
|
||||||
checkboxTable.addNuclearWeaponsCheckbox()
|
checkboxTable.addNuclearWeaponsCheckbox()
|
||||||
checkboxTable.addIsOnlineMultiplayerCheckbox()
|
checkboxTable.addIsOnlineMultiplayerCheckbox()
|
||||||
|
if (UncivGame.Current.settings.enableEspionageOption)
|
||||||
|
checkboxTable.addEnableEspionageCheckbox()
|
||||||
checkboxTable.addNoStartBiasCheckbox()
|
checkboxTable.addNoStartBiasCheckbox()
|
||||||
add(checkboxTable).center().row()
|
add(checkboxTable).center().row()
|
||||||
|
|
||||||
@ -111,6 +113,11 @@ class GameOptionsTable(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun Table.addEnableEspionageCheckbox() =
|
||||||
|
addCheckbox("Enable Espionage", gameParameters.espionageEnabled)
|
||||||
|
{ gameParameters.espionageEnabled = it }
|
||||||
|
|
||||||
|
|
||||||
private fun numberOfCityStates() = ruleset.nations.values.count {
|
private fun numberOfCityStates() = ruleset.nations.values.count {
|
||||||
it.isCityState()
|
it.isCityState()
|
||||||
&& !it.hasUnique(UniqueType.CityStateDeprecated)
|
&& !it.hasUnique(UniqueType.CityStateDeprecated)
|
||||||
|
@ -51,6 +51,9 @@ fun debugTab() = Table(BaseScreen.skin).apply {
|
|||||||
curGameInfo.gameParameters.godMode = it
|
curGameInfo.gameParameters.godMode = it
|
||||||
}).colspan(2).row()
|
}).colspan(2).row()
|
||||||
}
|
}
|
||||||
|
add("Enable espionage option".toCheckBox(game.settings.enableEspionageOption) {
|
||||||
|
game.settings.enableEspionageOption = it
|
||||||
|
}).colspan(2).row()
|
||||||
add("Save games compressed".toCheckBox(UncivFiles.saveZipped) {
|
add("Save games compressed".toCheckBox(UncivFiles.saveZipped) {
|
||||||
UncivFiles.saveZipped = it
|
UncivFiles.saveZipped = it
|
||||||
}).colspan(2).row()
|
}).colspan(2).row()
|
||||||
|
@ -744,11 +744,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
|
|
||||||
Applicable to: Global, Unit
|
Applicable to: Global, Unit
|
||||||
|
|
||||||
??? example "[greatPerson] is earned [relativeAmount]% faster"
|
|
||||||
Example: "[Great General] is earned [+20]% faster"
|
|
||||||
|
|
||||||
Applicable to: Global, Unit
|
|
||||||
|
|
||||||
??? example "Earn [amount]% of the damage done to [combatantFilter] units as [civWideStat]"
|
??? example "Earn [amount]% of the damage done to [combatantFilter] units as [civWideStat]"
|
||||||
Example: "Earn [3]% of the damage done to [City] units as [Gold]"
|
Example: "Earn [3]% of the damage done to [City] units as [Gold]"
|
||||||
|
|
||||||
@ -774,6 +769,11 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
|
|
||||||
Applicable to: Global, Unit
|
Applicable to: Global, Unit
|
||||||
|
|
||||||
|
??? example "[greatPerson] is earned [relativeAmount]% faster"
|
||||||
|
Example: "[Great General] is earned [+20]% faster"
|
||||||
|
|
||||||
|
Applicable to: Global, Unit
|
||||||
|
|
||||||
??? example "[amount] Movement point cost to disembark"
|
??? example "[amount] Movement point cost to disembark"
|
||||||
Example: "[3] Movement point cost to disembark"
|
Example: "[3] Movement point cost to disembark"
|
||||||
|
|
||||||
@ -1173,6 +1173,9 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
|
|
||||||
Applicable to: Unit
|
Applicable to: Unit
|
||||||
|
|
||||||
|
??? example "Destroys tile improvements when attacking"
|
||||||
|
Applicable to: Unit
|
||||||
|
|
||||||
??? example "Double movement in [terrainFilter]"
|
??? example "Double movement in [terrainFilter]"
|
||||||
Example: "Double movement in [Fresh Water]"
|
Example: "Double movement in [Fresh Water]"
|
||||||
|
|
||||||
@ -1663,11 +1666,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
??? example "<during a Golden Age>"
|
??? example "<during a Golden Age>"
|
||||||
Applicable to: Conditional
|
Applicable to: Conditional
|
||||||
|
|
||||||
??? example "<with [resource]>"
|
|
||||||
Example: "<with [Iron]>"
|
|
||||||
|
|
||||||
Applicable to: Conditional
|
|
||||||
|
|
||||||
??? example "<while the empire is happy>"
|
??? example "<while the empire is happy>"
|
||||||
Applicable to: Conditional
|
Applicable to: Conditional
|
||||||
|
|
||||||
@ -1729,6 +1727,16 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
|
|||||||
|
|
||||||
Applicable to: Conditional
|
Applicable to: Conditional
|
||||||
|
|
||||||
|
??? example "<with [resource]>"
|
||||||
|
Example: "<with [Iron]>"
|
||||||
|
|
||||||
|
Applicable to: Conditional
|
||||||
|
|
||||||
|
??? example "<without [resource]>"
|
||||||
|
Example: "<without [Iron]>"
|
||||||
|
|
||||||
|
Applicable to: Conditional
|
||||||
|
|
||||||
??? example "<in cities with a [buildingFilter]>"
|
??? example "<in cities with a [buildingFilter]>"
|
||||||
Example: "<in cities with a [Culture]>"
|
Example: "<in cities with a [Culture]>"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user