private void Awake() { Configuration = base.Config; new Log(Logger); #region Not Release Message #if !RELEASE //Additional references in this block must be fully qualifed as to not use them in Release Builds. string gitVersion = ""; using (System.IO.Stream stream = System.Reflection.Assembly.GetExecutingAssembly() .GetManifestResourceStream($"{this.GetType().Namespace}.Resources.CurrentCommit")) using (System.IO.StreamReader reader = new System.IO.StreamReader(stream)) { gitVersion = reader.ReadToEnd(); } Log.MessageWarning( #if DEBUG $"This is a debug build!" #elif NONETWORK $"This is a non-networked build!" #elif NODYN $"This is a build without Microsoft.CSharp.dll included. Please put that file manually in your /plugins/ folder." #elif BLEEDING $"This is a Bleeding-Edge build!" #endif , Log.Target.Bepinex); Log.MessageWarning($"Commit: {gitVersion.Trim()}", Log.Target.Bepinex); #endif #endregion Log.Message("Created by Harb, iDeathHD and . Based on RoR2Cheats by Morris1927.", LogLevel.Info, Log.Target.Bepinex); MacroSystem.Init(); PermissionSystem.Init(); Hooks.InitializeHooks(); NetworkManager.Init(); RunCmdMethod = typeof(Console).GetMethod("RunCmd", BindingFlags.Instance | BindingFlags.NonPublic); }
private void TargetLog(NetworkConnection _, string msg, int level) { Log.Message(msg, (Log.LogLevel)level); Hooks.ScrollConsoleDown(); }
private static void HandleNetworkMessage(LogNetworkMessageClass msg) { Message(msg.message, (LogLevel)msg.level); Hooks.ScrollConsoleDown(); }