add the ability for novetus to generate _meta.ini files!
This commit is contained in:
parent
4df2bde691
commit
629b19b2ed
|
|
@ -2,6 +2,7 @@ EDGE Snapshot v23.8745.28516.1
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- Play Solo now uses the current server port (defined in the Host menu.)
|
- Play Solo now uses the current server port (defined in the Host menu.)
|
||||||
- This makes it easier to launch Play Solo on some computers.
|
- This makes it easier to launch Play Solo on some computers.
|
||||||
|
- Novetus will now create basic _meta.ini files for games that have badges! They can then be filled out with correct information by map creators and archivists.
|
||||||
Fixes:
|
Fixes:
|
||||||
- Fixed the AwardBadge and HasBadge extensions not working properly.
|
- Fixed the AwardBadge and HasBadge extensions not working properly.
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -72,21 +72,18 @@ public class AwardBadge : IWebProxyExtension
|
||||||
metaFile = GlobalPaths.DataDir + "\\Appreciation_meta.ini";
|
metaFile = GlobalPaths.DataDir + "\\Appreciation_meta.ini";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (File.Exists(metaFile))
|
try
|
||||||
|
{
|
||||||
|
INIFile metaIni = new INIFile(metaFile, !(File.Exists(metaFile));
|
||||||
|
string section = BadgeID.ToString();
|
||||||
|
|
||||||
|
string name = metaIni.IniReadValue(section, "BadgeName", "Unknown Badge #" + BadgeID.ToString());
|
||||||
|
string creator = metaIni.IniReadValue(section, "BadgeCreatorName", "Unknown");
|
||||||
|
result.BadgeName = name;
|
||||||
|
result.BadgeCreatorName = creator;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
{
|
{
|
||||||
try
|
|
||||||
{
|
|
||||||
INIFile metaIni = new INIFile(metaFile, false);
|
|
||||||
string section = BadgeID.ToString();
|
|
||||||
|
|
||||||
string name = metaIni.IniReadValue(section, "BadgeName", BadgeID.ToString());
|
|
||||||
string creator = metaIni.IniReadValue(section, "BadgeCreatorName", "Unknown");
|
|
||||||
result.BadgeName = name;
|
|
||||||
result.BadgeCreatorName = creator;
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue