Skip to content

Commit cac3cfe

Browse files
committed
fix for not removing completed research from other bases.
but let's leave live alien interrogations alone.
1 parent dc5cacd commit cac3cfe

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/Geoscape/GeoscapeState.cpp‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,6 +1422,18 @@ void GeoscapeState::time1Day()
14221422
{
14231423
popup(new NewPossibleManufactureState(_game, *i, newPossibleManufacture));
14241424
}
1425+
// now iterate through all the bases and remove this project from their labs
1426+
for (std::vector<Base*>::iterator j = _game->getSavedGame()->getBases()->begin(); j != _game->getSavedGame()->getBases()->end(); ++j)
1427+
{
1428+
for (std::vector<ResearchProject*>::const_iterator iter2 = (*j)->getResearch().begin (); iter2 != (*j)->getResearch().end (); ++iter2)
1429+
{
1430+
if ((*iter)->getRules()->getName() == (*iter2)->getRules()->getName() &&
1431+
std::find((*iter2)->getRules()->getUnlocked().begin(), (*iter2)->getRules()->getUnlocked().end(), "STR_ALIEN_ORIGINS") != (*iter2)->getRules()->getUnlocked().end())
1432+
{
1433+
(*j)->removeResearch(*iter2);
1434+
}
1435+
}
1436+
}
14251437
delete(*iter);
14261438
}
14271439
// Handle soldier wounds

0 commit comments

Comments
 (0)