private: bool IsEditableItem(const ScriptConfigItem config_item) const { if (_game_mode == GM_MENU) return true; if (_game_mode == GM_NORMAL) { if (IsConsideredDead(slot)) return true; if (config_item.flags & SCRIPTCONFIG_INGAME) return true; } if (IsConsideredDead(slot)) { if (slot == OWNER_DEITY) { if (Game::GetInstance() == nullptr) return true; } if (!Company::IsValidAiID(slot)) return true; if (Company::Get(slot)->ai_instance == NULL) return true; } return false; } };