Clicking the spy button no longer allows the spy to be moved when it isn't their turn (#11609)

This commit is contained in:
Oskar Niesen
2024-05-27 04:32:44 -05:00
committed by GitHub
parent 11cee77fb9
commit 286005188f

View File

@ -180,11 +180,14 @@ class EspionageOverviewScreen(val civInfo: Civilization, val worldScreen: WorldS
}
add(starTable).center().padLeft(-4f)
onClick {
onSpyClicked(moveSpyButtons[spy]!!, spy)
}
onRightClick {
onSpyRightClicked(spy)
// Spectators aren't allowed to move the spies of the Civs they are viewing
if (worldScreen.canChangeState && spy.isAlive()) {
onClick {
onSpyClicked(moveSpyButtons[spy]!!, spy)
}
onRightClick {
onSpyRightClicked(spy)
}
}
}