Some more hard-coded text removal

This commit is contained in:
Joonas Rikkonen
2018-01-31 19:01:48 +02:00
parent 6e231b7e7d
commit dcb6de32c0
21 changed files with 136 additions and 105 deletions
@@ -12,6 +12,9 @@ namespace Barotrauma
public List<SkillPrefab> Skills;
//the number of these characters in the crew the player starts with
public readonly int InitialCount;
public string Name
{
get;
@@ -69,6 +72,8 @@ namespace Barotrauma
MaxNumber = element.GetAttributeInt("maxnumber", 10);
MinKarma = element.GetAttributeFloat("minkarma", 0.0f);
InitialCount = element.GetAttributeInt("initialcount", 0);
Commonness = element.GetAttributeInt("commonness", 10);
AllowAlways = element.GetAttributeBool("allowalways", false);
@@ -156,9 +156,9 @@ namespace Barotrauma
try
{
if (file.path.EndsWith(".xml", true, System.Globalization.CultureInfo.InvariantCulture))
hashes.Add(calculateXmlHash(file, ref md5));
hashes.Add(CalculateXmlHash(file, ref md5));
else
hashes.Add(calculateFileHash(file, ref md5));
hashes.Add(CalculateFileHash(file, ref md5));
}
catch (Exception e)
@@ -180,7 +180,7 @@ namespace Barotrauma
}
private byte[] calculateXmlHash(ContentFile file, ref MD5 md5) //todo: Change ref to in (in C# 7.2)
private byte[] CalculateXmlHash(ContentFile file, ref MD5 md5) //todo: Change ref to in (in C# 7.2)
{
var doc = XMLExtensions.TryLoadXml(file.path);
@@ -200,7 +200,7 @@ namespace Barotrauma
}
}
private byte[] calculateFileHash(ContentFile file, ref MD5 md5)
private byte[] CalculateFileHash(ContentFile file, ref MD5 md5)
{
using (var stream = File.OpenRead(file.path))
{