Content packages & MD5 hash comparison between client and server

This commit is contained in:
Regalis
2015-07-20 21:27:44 +03:00
parent 4aa3d9d7ee
commit 326b46cf18
45 changed files with 1217 additions and 158 deletions
+21
View File
@@ -400,6 +400,27 @@ namespace Subsurface
CharacterList.Add(this);
}
private static string humanConfigFile;
public static string HumanConfigFile
{
get
{
if (string.IsNullOrEmpty(humanConfigFile))
{
var characterFiles = Game1.SelectedPackage.GetFilesOfType(ContentType.Character);
humanConfigFile = characterFiles.Find(c => c.EndsWith("human.xml"));
if (humanConfigFile == null)
{
DebugConsole.ThrowError("Couldn't find a config file for humans from the selected content package!");
DebugConsole.ThrowError("(The config file must end with ''human.xml'')");
return "";
}
}
return humanConfigFile;
}
}
public void GiveJobItems(WayPoint spawnPoint)
{
if (Info == null || Info.Job == null) return;