Enhancements: Add spaces to tags (#2079)

- Matching RDB format.
- Keep checks for old version to avoid breaking user enhancements, due to lack of a fixed control mechanism for upgrading
This commit is contained in:
Kimberly J Ortega 2021-07-11 21:00:28 -07:00 committed by GitHub
parent e5cfb4bdeb
commit 416205ed5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -163,7 +163,7 @@ CEnhancement::CEnhancement(const char * Ident, const char * Entry) :
}
Key.resize(Seperator);
if (stricmp(Key.c_str(), "PluginList") == 0)
if (stricmp(Key.c_str(), "PluginList") == 0 || stricmp(Key.c_str(), "Plugin List") == 0)
{
strvector Plugins = stdstr(&Pos[1]).Tokenize(",");
for (size_t i = 0, n = Plugins.size(); i < n; i++)
@ -175,11 +175,11 @@ CEnhancement::CEnhancement(const char * Ident, const char * Entry) :
{
m_Note = &Pos[1];
}
else if (stricmp(Key.c_str(), "OnByDefault") == 0)
else if (stricmp(Key.c_str(), "OnByDefault") == 0 || stricmp(Key.c_str(), "On By Default") == 0)
{
m_OnByDefault = Pos[1] == '1';
}
else if (stricmp(Key.c_str(), "OverClock") == 0)
else if (stricmp(Key.c_str(), "Overclock") == 0)
{
SetOverClock(true, atoi(&Pos[1]));
}

View File

@ -331,7 +331,7 @@ void CEnhancmentFile::SaveCurrentSection(void)
}
if (Enhancement.OverClock())
{
Section += stdstr_f("OverClock=%d%s", Enhancement.OverClockModifier(), m_LineFeed);
Section += stdstr_f("Overclock=%d%s", Enhancement.OverClockModifier(), m_LineFeed);
}
if (!Enhancement.GetNote().empty())
{