* Check whether the currently selected AI/GS is dead. * @return true if dead. */
| 697 | * @return true if dead. |
| 698 | */ |
| 699 | bool IsDead() const |
| 700 | { |
| 701 | if (this->filter.script_debug_company == OWNER_DEITY) { |
| 702 | GameInstance *game = Game::GetInstance(); |
| 703 | return game == nullptr || game->IsDead(); |
| 704 | } |
| 705 | return !Company::IsValidAiID(this->filter.script_debug_company) || Company::Get(this->filter.script_debug_company)->ai_instance->IsDead(); |
| 706 | } |
| 707 | |
| 708 | /** |
| 709 | * Check whether a company is a valid AI company or GS. |
no outgoing calls
no test coverage detected