Saveload: Store NewGRF name in savegame, include in missing GRF message

This commit is contained in:
Jonathan G Rennison
2020-12-16 02:06:48 +00:00
parent d328f359c9
commit f0c3a4b42e
6 changed files with 32 additions and 2 deletions

View File

@@ -616,7 +616,7 @@ GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
f = FindGRFConfig(c->ident.grfid, FGCM_COMPATIBLE, nullptr, c->version);
if (f != nullptr) {
md5sumToString(buf, lastof(buf), c->ident.md5sum);
DEBUG(grf, 1, "NewGRF %08X (%s) not found; checksum %s. Compatibility mode on", BSWAP32(c->ident.grfid), c->GetDisplayPath(), buf);
DEBUG(grf, 1, "NewGRF %08X (%s) not found; checksum %s, name: '%s'. Compatibility mode on", BSWAP32(c->ident.grfid), c->GetDisplayPath(), buf, GetDefaultLangGRFStringFromGRFText(c->name));
if (!HasBit(c->flags, GCF_COMPATIBLE)) {
/* Preserve original_md5sum after it has been assigned */
SetBit(c->flags, GCF_COMPATIBLE);
@@ -630,7 +630,7 @@ GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
/* No compatible grf was found, mark it as disabled */
md5sumToString(buf, lastof(buf), c->ident.md5sum);
DEBUG(grf, 0, "NewGRF %08X (%s) not found; checksum %s", BSWAP32(c->ident.grfid), c->GetDisplayPath(), buf);
DEBUG(grf, 0, "NewGRF %08X (%s) not found; checksum %s, name: '%s'", BSWAP32(c->ident.grfid), c->GetDisplayPath(), buf, GetDefaultLangGRFStringFromGRFText(c->name));
c->status = GCS_NOT_FOUND;
res = GLC_NOT_FOUND;