Don't complain about missing elements that aren't actually used

We would complain about them indiscriminately, see 36800a76cd.
This commit is contained in:
Tamás Bálint Misius
2024-12-02 18:38:26 +01:00
parent 75d33adbde
commit 5e20edeb9e

View File

@@ -67,6 +67,7 @@ void GameSave::MapPalette()
auto &sd = SimulationData::CRef(); auto &sd = SimulationData::CRef();
auto &elements = sd.elements; auto &elements = sd.elements;
std::map<ByteString, int> missingElementIdentifiers;
if(palette.size()) if(palette.size())
{ {
if (version >= Version(98, 0)) if (version >= Version(98, 0))
@@ -94,7 +95,7 @@ void GameSave::MapPalette()
} }
else else
{ {
missingElements.identifiers.insert(pi); missingElementIdentifiers.insert(pi);
} }
} }
} }
@@ -137,6 +138,13 @@ void GameSave::MapPalette()
} }
} }
} }
for (const auto &pi : missingElementIdentifiers)
{
if (missingElements.ids.find(pi.second) != missingElements.ids.end())
{
missingElements.identifiers.insert(pi);
}
}
} }
void GameSave::Expand(const std::vector<char> &data) void GameSave::Expand(const std::vector<char> &data)