| 1178 | } |
| 1179 | |
| 1180 | static void AISaveConfig(IniFile &ini, std::string_view grpname) |
| 1181 | { |
| 1182 | IniGroup &group = ini.GetOrCreateGroup(grpname); |
| 1183 | group.Clear(); |
| 1184 | |
| 1185 | for (CompanyID c = CompanyID::Begin(); c < MAX_COMPANIES; ++c) { |
| 1186 | AIConfig *config = AIConfig::GetConfig(c, AIConfig::SSS_FORCE_NEWGAME); |
| 1187 | std::string name; |
| 1188 | std::string value = config->SettingsToString(); |
| 1189 | |
| 1190 | if (config->HasScript()) { |
| 1191 | name = config->GetName(); |
| 1192 | } else { |
| 1193 | name = "none"; |
| 1194 | } |
| 1195 | |
| 1196 | group.CreateItem(name).SetValue(value); |
| 1197 | } |
| 1198 | } |
| 1199 | |
| 1200 | static void GameSaveConfig(IniFile &ini, std::string_view grpname) |
| 1201 | { |
no test coverage detected