mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +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) {
|
add("Gdx Scene2D debug".toCheckBox(BaseScreen.enableSceneDebug) {
|
||||||
BaseScreen.enableSceneDebug = it
|
BaseScreen.enableSceneDebug = it
|
||||||
}).row()
|
}).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
|
//endregion
|
||||||
|
Reference in New Issue
Block a user