mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[server] Add planes command to list current planes
This commit is contained in:
parent
1b28b309ce
commit
1cab9bd0de
1 changed files with 14 additions and 2 deletions
|
@ -91,16 +91,28 @@ namespace Nibriboard
|
||||||
{
|
{
|
||||||
case "help":
|
case "help":
|
||||||
await destination.WriteLineAsync("Nibriboard Server Command Console");
|
await destination.WriteLineAsync("Nibriboard Server Command Console");
|
||||||
await destination.WriteLineAsync("================================");
|
await destination.WriteLineAsync("=================================");
|
||||||
await destination.WriteLineAsync("Available commands:");
|
await destination.WriteLineAsync("Available commands:");
|
||||||
await destination.WriteLineAsync(" help Show this message");
|
await destination.WriteLineAsync(" help Show this message");
|
||||||
await destination.WriteLineAsync(" save Save the ripplespace to disk");
|
await destination.WriteLineAsync(" save Save the ripplespace to disk");
|
||||||
|
await destination.WriteLineAsync(" planes List all the currently loaded planes");
|
||||||
break;
|
break;
|
||||||
case "save":
|
case "save":
|
||||||
await destination.WriteAsync("Saving ripple space - ");
|
await destination.WriteAsync("Saving ripple space - ");
|
||||||
await planeManager.Save();
|
await planeManager.Save();
|
||||||
await destination.WriteLineAsync("done.");
|
await destination.WriteLineAsync("done.");
|
||||||
break;
|
break;
|
||||||
|
case "planes":
|
||||||
|
await destination.WriteLineAsync("Planes:");
|
||||||
|
foreach(Plane plane in planeManager.Planes)
|
||||||
|
await destination.WriteLineAsync($"\t{plane.Name}");
|
||||||
|
await destination.WriteLineAsync();
|
||||||
|
await destination.WriteLineAsync($"Total {planeManager.Planes.Count}");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
await destination.WriteLineAsync($"Error: Unrecognised command {commandParts[0].Trim()}");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception error)
|
catch(Exception error)
|
||||||
|
|
Loading…
Reference in a new issue