1 | bool editable = _game_mode == GM_MENU ||
| 1 | private:
|
---|
2 | (_game_mode == GM_NORMAL && (IsConsideredDead(this->slot) || (config_item.flags & SCRIPTCONFIG_INGAME) != 0)) ||
| 2 | bool IsEditableItem(const ScriptConfigItem config_item) const
|
---|
3 | (IsConsideredDead(this->slot) && (this->slot == OWNER_DEITY ? Game::GetInstance() == NULL : !IsValidAiID(this->slot) || Company::Get(this->slot)->ai_instance == NULL)); | 3 | {
|
---|
| | 4 | if (_game_mode == GM_MENU) return true;
|
---|
| | 5 |
|
---|
| | 6 | if (_game_mode == GM_NORMAL) {
|
---|
| | 7 | if (IsConsideredDead(slot)) return true;
|
---|
| | 8 | if (config_item.flags & SCRIPTCONFIG_INGAME) return true;
|
---|
| | 9 | }
|
---|
| | 10 |
|
---|
| | 11 | if (IsConsideredDead(slot)) {
|
---|
| | 12 | if (slot == OWNER_DEITY) {
|
---|
| | 13 | if (Game::GetInstance() == nullptr) return true;
|
---|
| | 14 | }
|
---|
| | 15 | if (!Company::IsValidAiID(slot)) return true;
|
---|
| | 16 | if (Company::Get(slot)->ai_instance == NULL) return true;
|
---|
| | 17 | }
|
---|
| | 18 |
|
---|
| | 19 | return false;
|
---|
| | 20 | }
|
---|
| | 21 | }; |
---|