Husk sounds & event, removing logfiles with cleanbuild command,

This commit is contained in:
Regalis
2016-02-14 22:50:34 +02:00
parent ef78f2d0f6
commit 35e2d441fc
14 changed files with 43 additions and 8 deletions

View File

@@ -583,7 +583,7 @@ namespace Barotrauma
public int GetSkillLevel(string skillName)
{
return Info.Job.GetSkillLevel(skillName);
return (Info==null || Info.Job==null) ? 0 : Info.Job.GetSkillLevel(skillName);
}
float findClosestTimer;

View File

@@ -449,6 +449,14 @@ namespace Barotrauma
DebugConsole.NewMessage("Deleted "+saveFile, Color.Green);
}
var logFiles = System.IO.Directory.GetFiles(ServerLog.SavePath);
foreach (string logFile in logFiles)
{
System.IO.File.Delete(logFile);
DebugConsole.NewMessage("Deleted "+logFile, Color.Green);
}
if (System.IO.File.Exists("filelist.xml"))
{
System.IO.File.Delete("filelist.xml");

View File

@@ -1019,7 +1019,7 @@ namespace Barotrauma
bool showUiMsg = picker == Character.Controlled && Screen.Selected != GameMain.EditMapScreen;
if (!ignoreRequiredItems && !ic.HasRequiredItems(picker, showUiMsg)) continue;
if ((ic.CanBePicked && pickHit && ic.Pick(picker)) ||
(ic.CanBeSelected && selectHit && ic.Select(picker)))
(ic.CanBeSelected && selectHit && ic.Select(picker)))
{
picked = true;
ic.ApplyStatusEffects(ActionType.OnPicked, 1.0f, picker);

View File

@@ -11,7 +11,7 @@ namespace Barotrauma.Networking
{
const int LinesPerFile = 300;
const string SavePath = "ServerLogs";
public const string SavePath = "ServerLogs";
private string serverName;