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

Method isOver

src/Savegame/AlienMission.cpp:127–139  ·  view source on GitHub ↗

* Check if a mission is over and can be safely removed from the game. * A mission is over if it will spawn no more UFOs and it has no UFOs still in * the game. * @return If the mission can be safely removed from game. */

Source from the content-addressed store, hash-verified

125 * @return If the mission can be safely removed from game.
126 */
127bool AlienMission::isOver() const
128{
129 if (_rule.getType() == "STR_ALIEN_INFILTRATION")
130 {
131 //Infiltrations continue for ever.
132 return false;
133 }
134 if (_nextWave == _rule.getWaveCount() && !_liveUfos)
135 {
136 return true;
137 }
138 return false;
139}
140
141/**
142 * Find an XCOM base in this region that is marked for retaliation.

Callers 1

time30MinutesMethod · 0.80

Calls 2

getWaveCountMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected