* Load a NewGRF configuration by preset-name. * @param config_name Name of the preset. * @return NewGRF configuration. * @see GetGRFPresetList */
| 1562 | * @see GetGRFPresetList |
| 1563 | */ |
| 1564 | GRFConfigList LoadGRFPresetFromConfig(std::string_view config_name) |
| 1565 | { |
| 1566 | std::string section("preset-"); |
| 1567 | section += config_name; |
| 1568 | |
| 1569 | ConfigIniFile ini(_config_file); |
| 1570 | GRFConfigList config = GRFLoadConfig(ini, section, false); |
| 1571 | |
| 1572 | return config; |
| 1573 | } |
| 1574 | |
| 1575 | /** |
| 1576 | * Save a NewGRF configuration with a preset name. |
no test coverage detected