Old revision #pytpi3bkw | New revision #pcgnsbddr | ||
---|---|---|---|
1 | this->SetWidgetDisabledState(WID_AIC_CHANGE, ((this->selected_slot == OWNER_DEITY && _game_mode == GM_NORMAL) || this->selected_slot == INVALID_COMPANY) || (this->selected_slot <= MAX_COMPANIES && _game_mode == GM_NORMAL && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead())); | 1 | bool gs_slot = this->selected_slot == OWNER_DEITY; |
2 | bool dead_ai_slot = IsEditable((CompanyID)(this->selected_slot)) && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead(); | ||
3 | this->SetWidgetDisabledState(WID_AIC_CHANGE, _game_mode == GM_NORMAL && (gs_slot || dead_ai_slot) || this->selected_slot == INVALID_COMPANY); |