mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
Generalized options in game configurations can now optionally define a name
This commit is contained in:
parent
9fcb45e1b1
commit
0817ea2de6
1 changed files with 6 additions and 2 deletions
|
@ -71,14 +71,18 @@ namespace CodeImp.DoomBuilder.Config
|
|||
{
|
||||
// Check if the item key is numeric
|
||||
int index;
|
||||
if(int.TryParse(de.Key.ToString(), NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, CultureInfo.InvariantCulture, out index))
|
||||
string key = de.Key.ToString();
|
||||
if (int.TryParse(key, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, CultureInfo.InvariantCulture, out index))
|
||||
{
|
||||
// Add to list
|
||||
this.bits.Add(new GeneralizedBit(index, de.Value.ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Structure \"" + fullpath + "." + name + "\" contains invalid entries. The keys must be numeric.");
|
||||
if (key == "name")
|
||||
this.name = de.Value.ToString();
|
||||
else
|
||||
General.ErrorLogger.Add(ErrorType.Warning, "Structure \"" + fullpath + "." + name + "\" contains invalid entries. The keys must be numeric.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue