| 6508 | } |
| 6509 | |
| 6510 | ScriptableCampaign* Engine::GetCurrentCampaign() { |
| 6511 | if (current_engine_state_.type == kEngineCampaignState) { |
| 6512 | if (current_engine_state_.campaign.Valid()) { |
| 6513 | return current_engine_state_.campaign.GetPtr(); |
| 6514 | } |
| 6515 | } else { |
| 6516 | for (auto& i : state_history) { |
| 6517 | if (i.type == kEngineCampaignState) { |
| 6518 | if (i.campaign.Valid()) { |
| 6519 | return i.campaign.GetPtr(); |
| 6520 | } |
| 6521 | } |
| 6522 | } |
| 6523 | } |
| 6524 | |
| 6525 | return NULL; |
| 6526 | } |
| 6527 | |
| 6528 | std::string Engine::GetCurrentLevelID() { |
| 6529 | if (current_engine_state_.type == kEngineLevelState || current_engine_state_.type == kEngineEditorLevelState) { |
no test coverage detected