mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 10:49:53 +02:00
Don't complain about missing elements that aren't actually used
We would complain about them indiscriminately, see 36800a76cd
.
This commit is contained in:
@@ -67,6 +67,7 @@ void GameSave::MapPalette()
|
||||
|
||||
auto &sd = SimulationData::CRef();
|
||||
auto &elements = sd.elements;
|
||||
std::map<ByteString, int> missingElementIdentifiers;
|
||||
if(palette.size())
|
||||
{
|
||||
if (version >= Version(98, 0))
|
||||
@@ -94,7 +95,7 @@ void GameSave::MapPalette()
|
||||
}
|
||||
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)
|
||||
|
Reference in New Issue
Block a user