public void Shutdown(string reason = null) { if (reason != null) { Logger.Info($"Shutting down! Reason: {reason}"); } else { Logger.Info("Shutting down!"); } if (Mode != DisplayMode.Godot) { _mainLoop.Running = false; } presence.Free(); Logger.Debug("Goodbye"); IoCManager.Clear(); ShuttingDownHard = true; // Hahaha Godot is crashing absurdly and I can't be bothered to fix it. // Hey now it shuts down easily. Environment.Exit(0); }