/** * Returns to the previous screen. * @param action Pointer to an action. */ void ConfirmCydoniaState::btnYesClick(Action *) { _game->popState(); _game->popState(); SavedBattleGame *bgame = new SavedBattleGame(); _game->getSavedGame()->setBattleGame(bgame); BattlescapeGenerator bgen = BattlescapeGenerator(_game); for (std::vector<std::string>::const_iterator i = _game->getRuleset()->getDeploymentsList().begin(); i != _game->getRuleset()->getDeploymentsList().end(); ++i) { AlienDeployment *deployment = _game->getRuleset()->getDeployment(*i); if (deployment->isFinalDestination()) { bgame->setMissionType(*i); bgen.setAlienRace(deployment->getRace()); break; } } bgen.setCraft(_craft); bgen.run(); _game->pushState(new BriefingState(_craft)); }