mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 13:49:54 +07:00
Added an option to unlock all techs to the debug menu (#5820)
This commit is contained in:
@ -336,6 +336,14 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) {
|
||||
add("Gdx Scene2D debug".toCheckBox(BaseScreen.enableSceneDebug) {
|
||||
BaseScreen.enableSceneDebug = it
|
||||
}).row()
|
||||
val unlockTechsButton = "Unlock all techs".toTextButton()
|
||||
unlockTechsButton.onChange {
|
||||
for (tech in game.gameInfo.ruleSet.technologies.keys) {
|
||||
if (tech !in game.gameInfo.getCurrentPlayerCivilization().tech.techsResearched)
|
||||
game.gameInfo.getCurrentPlayerCivilization().tech.addTechnology(tech)
|
||||
}
|
||||
}
|
||||
add(unlockTechsButton)
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
Reference in New Issue
Block a user