Fix #8846: When upgrading NewGRF presets, copy NewGRF parameters only if the NewGRF are compatible. Otherwise reset to defaults.

This commit is contained in:
frosch
2023-10-01 15:21:57 +02:00
committed by frosch
parent d75a5e1a9a
commit 82c8720814
3 changed files with 15 additions and 2 deletions

View File

@@ -173,6 +173,7 @@ struct GRFConfig : ZeroedMemoryAllocator {
struct GRFConfig *next; ///< NOSAVE: Next item in the linked list
bool IsCompatible(uint32_t old_version) const;
void CopyParams(const GRFConfig &src);
std::optional<std::string> GetTextfile(TextfileType type) const;