Set the default value for all parameters as specified by action14. */
| 112 | |
| 113 | /** Set the default value for all parameters as specified by action14. */ |
| 114 | void GRFConfig::SetParameterDefaults() |
| 115 | { |
| 116 | this->param.clear(); |
| 117 | |
| 118 | if (!this->has_param_defaults) return; |
| 119 | |
| 120 | for (const auto &info : this->param_info) { |
| 121 | if (!info.has_value()) continue; |
| 122 | this->SetValue(info.value(), info->def_value); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * Set the palette of this GRFConfig to something suitable. |
no test coverage detected