MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / allowButtons

Method allowButtons

src/Battlescape/BattlescapeState.cpp:2019–2024  ·  view source on GitHub ↗

* 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.

Source from the content-addressed store, hash-verified

2017 * @return True if the player can still press buttons.
2018 */
2019bool 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.

Callers

nothing calls this directly

Calls 4

getSideMethod · 0.80
getPanicHandledMethod · 0.80
getProjectileMethod · 0.80
getDebugModeMethod · 0.45

Tested by

no test coverage detected