@@ -68,49 +68,57 @@ private static void ClearScreen()
6868 Clear ( ) ;
6969 }
7070
71- // ReSharper disable once FunctionRecursiveOnAllPaths
7271 private static void ClientMenu ( )
7372 {
74- WriteLine (
75- "Welcome to a Kerbal Space Program CLI. This is for actively updating Luna Multiplayer during beta testing. \n Below are some options that will hopefully make things a lot more simpler." ) ;
73+ while ( true )
74+ {
75+ WriteLine ( "Welcome to a Kerbal Space Program CLI. This is for actively updating Luna Multiplayer during beta testing. \n " +
76+ "Below are some options that will hopefully make things a lot more simpler." ) ;
7677
77- WriteLine ( "Options:" ) ;
78- ResetColor ( ) ;
79- ShowClientCommands ( ) ;
78+ WriteLine ( "Options:" ) ;
79+ ResetColor ( ) ;
80+ ShowClientCommands ( ) ;
8081
81- WriteLine ( "Enter a number to choose:" ) ;
82+ WriteLine ( "Enter a number to choose:" ) ;
8283
83- var i = int . Parse ( ReadLine ( ) ?? throw new InvalidOperationException ( ) ) ;
84- if ( i == 1 ) {
85- ClearScreen ( ) ;
86- KerbalSafeLaunch ( ) ;
87- }
84+ var i = int . Parse ( ReadLine ( ) ?? throw new InvalidOperationException ( ) ) ;
85+ if ( i == 1 )
86+ {
87+ ClearScreen ( ) ;
88+ KerbalSafeLaunch ( ) ;
89+ }
8890
89- if ( i == 2 ) {
90- ClearScreen ( ) ;
91- LunaSafeClientUpdate ( ) ;
92- }
91+ if ( i == 2 )
92+ {
93+ ClearScreen ( ) ;
94+ LunaSafeClientUpdate ( ) ;
95+ }
9396
94- if ( i == 3 ) {
95- ClearScreen ( ) ;
96- ServerMenu ( ) ;
97- }
97+ if ( i == 3 )
98+ {
99+ ClearScreen ( ) ;
100+ ServerMenu ( ) ;
101+ }
98102
99- if ( i == 4 ) {
100- ClearScreen ( ) ;
101- ShowKspDir ( ) ;
102- }
103- if ( i == 66 ) {
104- ClearScreen ( ) ;
105- GuiTest ( ) ;
106- }
103+ if ( i == 4 )
104+ {
105+ ClearScreen ( ) ;
106+ ShowKspDir ( ) ;
107+ }
108+
109+ if ( i == 66 )
110+ {
111+ ClearScreen ( ) ;
112+ GuiTest ( ) ;
113+ }
107114
108- ForegroundColor = ConsoleColor . Red ;
115+ ForegroundColor = ConsoleColor . Red ;
109116
110- WriteLine ( "Invalid Option\n " ) ;
111- ResetColor ( ) ;
112- ClientMenu ( ) ;
117+ WriteLine ( "Invalid Option\n " ) ;
118+ ResetColor ( ) ;
119+ }
113120 }
121+
114122 private static void ShowKspDir ( )
115123 {
116124 try
@@ -633,58 +641,54 @@ private static void SanityCheck()
633641 }
634642 }
635643
636- /// <summary>
637- /// </summary>
638644 private static void ServerMenu ( )
639645 {
640- LunaServerCheck ( ) ;
641- WriteLine (
642- "Here you can operate and manage your Luna Multiplayer servers by choosing one of the options below." ) ;
643- WriteLine ( "Options:" ) ;
644- ResetColor ( ) ;
645- ShowServerCommands ( ) ;
646-
647- WriteLine ( "Enter a number to choose:" ) ;
648- var input = int . Parse ( ReadLine ( ) ?? throw new InvalidOperationException ( ) ) ;
649- if ( input == 1 )
646+ while ( true )
650647 {
651- LunaSafeServerUpdate ( ) ;
652- }
648+ LunaServerCheck ( ) ;
649+ WriteLine ( "Here you can operate and manage your Luna Multiplayer servers by choosing one of the options below." ) ;
650+ WriteLine ( "Options:" ) ;
651+ ResetColor ( ) ;
652+ ShowServerCommands ( ) ;
653653
654- if ( input == 2 )
655- {
656- ClearScreen ( ) ;
654+ WriteLine ( "Enter a number to choose:" ) ;
655+ var input = int . Parse ( ReadLine ( ) ?? throw new InvalidOperationException ( ) ) ;
656+ if ( input == 1 )
657+ {
658+ LunaSafeServerUpdate ( ) ;
659+ }
657660
658- RunLunaServer ( ) ;
659- }
661+ if ( input == 2 )
662+ {
663+ ClearScreen ( ) ;
660664
661- if ( input == 3 )
662- {
663- //ConfigureServer();
664- }
665+ RunLunaServer ( ) ;
666+ }
665667
666- if ( input == 4 )
667- {
668- ClearScreen ( ) ;
669- ClientMenu ( ) ;
670- }
668+ if ( input == 3 )
669+ {
670+ //ConfigureServer();
671+ }
671672
672- if ( input == 000 )
673- {
674- ClearScreen ( ) ;
675- UninstallLuna ( ) ;
676- }
673+ if ( input == 4 )
674+ {
675+ ClearScreen ( ) ;
676+ ClientMenu ( ) ;
677+ }
677678
678- ForegroundColor = ConsoleColor . Red ;
679+ if ( input == 000 )
680+ {
681+ ClearScreen ( ) ;
682+ UninstallLuna ( ) ;
683+ }
679684
680- WriteLine ( "Invalid Option\n " ) ;
681- ResetColor ( ) ;
682- ServerMenu ( ) ;
685+ ForegroundColor = ConsoleColor . Red ;
686+
687+ WriteLine ( "Invalid Option\n " ) ;
688+ ResetColor ( ) ;
689+ }
683690 }
684691
685- /// <summary>
686- ///
687- /// </summary>
688692 private static void ShowClientCommands ( )
689693 {
690694 ForegroundColor = ConsoleColor . Magenta ;
@@ -695,8 +699,6 @@ private static void ShowClientCommands()
695699 ResetColor ( ) ;
696700 }
697701
698- /// <summary>
699- /// </summary>
700702 private static void ShowServerCommands ( )
701703 {
702704 var fCount = Directory . GetFiles ( "Server" ,
@@ -722,8 +724,6 @@ private static void ShowServerCommands()
722724 ResetColor ( ) ;
723725 }
724726
725- /// <summary>
726- /// </summary>
727727 private static void UninstallLuna ( )
728728 {
729729 WriteLine ( "============= Sad to see you go =============" ) ;
0 commit comments