Small enhancements introduced from Rbx2Source migration.
This commit is contained in:
@ -114,7 +114,7 @@ namespace RobloxFiles.XmlFormat
|
||||
}
|
||||
else if (RobloxFile.LogErrors)
|
||||
{
|
||||
Console.WriteLine("No IXmlPropertyToken found for property type: " + propType + '!');
|
||||
Console.Error.WriteLine("No IXmlPropertyToken found for property type: " + propType + '!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ namespace RobloxFiles.XmlFormat.PropertyTokens
|
||||
public class Color3Token : IXmlPropertyToken
|
||||
{
|
||||
public string Token => "Color3";
|
||||
private string[] Fields = new string[3] { "R", "G", "B" };
|
||||
private readonly string[] Fields = new string[3] { "R", "G", "B" };
|
||||
|
||||
public bool ReadProperty(Property prop, XmlNode token)
|
||||
{
|
||||
@ -21,7 +21,15 @@ namespace RobloxFiles.XmlFormat.PropertyTokens
|
||||
try
|
||||
{
|
||||
var coord = token[key];
|
||||
fields[i] = Formatting.ParseFloat(coord.InnerText);
|
||||
string text = coord?.InnerText;
|
||||
|
||||
if (text == null)
|
||||
{
|
||||
text = "0";
|
||||
success = false;
|
||||
}
|
||||
|
||||
fields[i] = Formatting.ParseFloat(text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ namespace RobloxFiles.XmlFormat.PropertyTokens
|
||||
if (!RobloxFile.LogErrors)
|
||||
return true;
|
||||
|
||||
Console.WriteLine("ContentToken: Got illegal base64 string: {0}", data);
|
||||
Console.Error.WriteLine("ContentToken: Got illegal base64 string: {0}", data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user