From 489f262116fff1c83c7923615212627f932d63a3 Mon Sep 17 00:00:00 2001 From: sonic <156506053+sonic998@users.noreply.github.com> Date: Sun, 18 Aug 2024 11:35:14 +0200 Subject: [PATCH] Add files via upload --- src/Util/OpenGamePrompt.cs | 23 +++++++++++++++++++++++ src/Util/PrintInfo.cs | 10 ++++++++++ src/Util/VerboseLogging.cs | 16 ++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 src/Util/OpenGamePrompt.cs create mode 100644 src/Util/PrintInfo.cs create mode 100644 src/Util/VerboseLogging.cs diff --git a/src/Util/OpenGamePrompt.cs b/src/Util/OpenGamePrompt.cs new file mode 100644 index 0000000..e8d11b0 --- /dev/null +++ b/src/Util/OpenGamePrompt.cs @@ -0,0 +1,23 @@ +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc; +using System.Diagnostics; + +namespace sodoff.Utils; + +public class OpenGamePrompt { + public static void prompt() { + string key; + Console.WriteLine("Do you want to open the game"); + Console.WriteLine("yes or no"); + key = Console.ReadLine(); + if (key == "yes") + { + Console.WriteLine("Opening game"); + Process.Start(Directory.GetParent(Environment.CurrentDirectory) + "/Client/" + "DOMain.exe"); + } + if (key == "no") + { + Console.WriteLine("You can manually open the game now"); + } + } +} \ No newline at end of file diff --git a/src/Util/PrintInfo.cs b/src/Util/PrintInfo.cs new file mode 100644 index 0000000..e8ea99d --- /dev/null +++ b/src/Util/PrintInfo.cs @@ -0,0 +1,10 @@ +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc; + +namespace sodoff.Utils; + +public class PrintInfo { + public static void print() { + Console.WriteLine("Press Ctrl + C to close the server"); + } +} \ No newline at end of file diff --git a/src/Util/VerboseLogging.cs b/src/Util/VerboseLogging.cs new file mode 100644 index 0000000..7ff678d --- /dev/null +++ b/src/Util/VerboseLogging.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.AspNetCore.Mvc; + +namespace sodoff.Utils; + +public class VerboseLogging { + public static void log() { + Console.WriteLine("[INFO] Server is loading Assets"); + Console.WriteLine("[INFO] Loading api"); + } + public static void ServerStartedMessage() + { + Console.WriteLine("Server is running"); + Console.WriteLine("You can run the game now"); + } +} \ No newline at end of file