Make init logs nicer
This commit is contained in:
@@ -52,12 +52,12 @@ namespace Barotrauma
|
||||
{
|
||||
if (rtValue == RunType.Standard && isEnabled)
|
||||
{
|
||||
LuaCsSetup.PrintCsMessage($"Standard run C# of {cp.Name}");
|
||||
LuaCsSetup.PrintCsMessage($"Added {cp.Name} {cp.ModVersion} to Cs compilation. (Standard)");
|
||||
return true;
|
||||
}
|
||||
else if (rtValue == RunType.Forced)
|
||||
{
|
||||
LuaCsSetup.PrintCsMessage($"Forced run C# of {cp.Name}");
|
||||
LuaCsSetup.PrintCsMessage($"Added {cp.Name} {cp.ModVersion} to Cs compilation. (Forced)");
|
||||
return true;
|
||||
}
|
||||
else if (rtValue == RunType.None)
|
||||
@@ -71,7 +71,7 @@ namespace Barotrauma
|
||||
|
||||
if (isEnabled)
|
||||
{
|
||||
LuaCsSetup.PrintCsMessage($"Assumed run C# of {cp.Name}");
|
||||
LuaCsSetup.PrintCsMessage($"Added {cp.Name} {cp.ModVersion} to Cs compilation. (Assumed)");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -124,7 +124,9 @@ namespace Barotrauma
|
||||
GameMain.Server.SendDirectChatMessage(ChatMessage.Create("", subStr, ChatMessageType.Console, null, textColor: Color.MediumPurple), c);
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
GameServer.Log(prefix + subStr, ServerLog.MessageType.ServerMessage);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using LuaCsCompatPatchFunc = Barotrauma.LuaCsPatch;
|
||||
using System.Diagnostics;
|
||||
|
||||
[assembly: InternalsVisibleTo(Barotrauma.CsScriptBase.CsScriptAssembly, AllInternalsVisible = true)]
|
||||
[assembly: InternalsVisibleTo(Barotrauma.CsScriptBase.CsOneTimeScriptAssembly, AllInternalsVisible = true)]
|
||||
@@ -346,6 +347,8 @@ namespace Barotrauma
|
||||
{
|
||||
try
|
||||
{
|
||||
Stopwatch compilationTime = new Stopwatch();
|
||||
compilationTime.Start();
|
||||
var modTypes = CsScriptLoader.Compile();
|
||||
modTypes.ForEach(t =>
|
||||
{
|
||||
@@ -358,6 +361,8 @@ namespace Barotrauma
|
||||
HandleException(ex, LuaCsMessageOrigin.CSharpMod);
|
||||
}
|
||||
});
|
||||
compilationTime.Stop();
|
||||
PrintCsMessage($"Took {compilationTime.ElapsedMilliseconds}ms to compile and run Cs Scripts.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user