Loading

Paste #paiimwyt5

  1. typedef std::vector<const ScriptConfigItem *> VisibleSettingsList;
  2. static VisibleSettingsList BuildVisibleSettingsList(CompanyID slot)
  3. {
  4.     VisibleSettingsList visible_settings; ///< List of visible AI settings
  5.     ScriptConfig *config_list = GetConfig(slot);
  6.  
  7.     ScriptConfigItemList::const_iterator it = config_list->GetConfigList()->begin();
  8.     for (; it != config_list->GetConfigList()->end(); it++) {
  9.         bool no_hide = (it->flags & SCRIPTCONFIG_DEVELOPER) == 0;
  10.         if (no_hide || _settings_client.gui.ai_developer_tools) {
  11.             visible_settings.push_back(&(*it));
  12.         }
  13.     }
  14.  
  15.     return visible_settings;
  16. }

Comments