MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / checkIfBuildingDisabled

Method checkIfBuildingDisabled

game/state/battle/battle.cpp:2058–2066  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2056}
2057
2058void Battle::checkIfBuildingDisabled(GameState &state [[maybe_unused]])
2059{
2060 if (!buildingCanBeDisabled || buildingDisabled || !tryDisableBuilding())
2061 {
2062 return;
2063 }
2064 buildingDisabled = true;
2065 fw().pushEvent(new GameEvent(GameEventType::BuildingDisabled));
2066}
2067
2068bool Battle::tryDisableBuilding()
2069{

Callers 2

dieMethod · 0.80
dropDownMethod · 0.80

Calls 1

pushEventMethod · 0.80

Tested by

no test coverage detected