Beispiel #1
0
 public static void Init(string fileName)
 {
     if (Instance == null)
     {
         Instance = new LogIO(fileName);
     }
 }
        private void AddChatCommands()
        {
            CmdManager.GetOrCreateGroup("/bv2", new CmdGroupInitializer
            {
                { "help", x => RichHudTerminal.OpenToPage(helpMain) },
                { "bind", x => UpdateBind(x[0], x.GetSubarray(1)), 2 },
                { "resetBinds", x => BvBinds.Cfg = BindsConfig.Defaults },
                { "save", x => BvConfig.SaveStart() },
                { "load", x => BvConfig.LoadStart() },
                { "resetConfig", x => BvConfig.ResetConfig() },

                // Debug/Testing
                { "open", x => QuickActionHudSpace.TryOpenMenu() },
                { "close", x => QuickActionHudSpace.CloseMenu() },
                { "reload", x => ExceptionHandler.ReloadClients() },
                { "crash", x => Crash() },
                { "printControlsToLog", x => LogIO.WriteToLogStart($"Control List:\n{HelpText.controlList}") },
                { "export", x => ExportBlockData() },
                { "import", x => TryImportBlockData() },
                { "checkType", x => ExceptionHandler.SendChatMessage($"Block Type: {(QuickActionHudSpace.Target?.SubtypeId.ToString() ?? "No Target")}") },
                { "toggleDebug", x => QuickActionMenu.DrawDebug = !QuickActionMenu.DrawDebug },
                { "toggleVisDbg", x => PropertyBlock.DebugVisibility = !PropertyBlock.DebugVisibility },
                { "toggleBoundingBox", x => QuickActionHudSpace.DrawBoundingBox = !QuickActionHudSpace.DrawBoundingBox },
                { "targetBench", TargetBench, 1 },
                { "getTarget", x => GetTarget() },
            });
        }
Beispiel #3
0
 private void InitStart()
 {
     if (!init && !initStart)
     {
         initStart = true;
         LogIO.Init(logFileName);
         ConfigIO.Init(configFileName);
         Config.LoadStart(InitFinish, true);
     }
 }