* Determines whether the player is allowed to press buttons. * Buttons are disabled in the middle of a shot, during the alien turn, * and while a player's units are panicking. * The save button is an exception as we want to still be able to save if something * goes wrong during the alien turn, and submit the save file for dissection. * @param allowSaving True, if the help button was clicked.
| 2017 | * @return True if the player can still press buttons. |
| 2018 | */ |
| 2019 | bool BattlescapeState::allowButtons(bool allowSaving) const |
| 2020 | { |
| 2021 | return ((allowSaving || _save->getSide() == FACTION_PLAYER || _save->getDebugMode()) |
| 2022 | && (_battleGame->getPanicHandled() || _firstInit ) |
| 2023 | && (_map->getProjectile() == 0)); |
| 2024 | } |
| 2025 | |
| 2026 | /** |
| 2027 | * Reserves time units for kneeling. |
nothing calls this directly
no test coverage detected