Fixed indentation

This commit is contained in:
Juan Pablo Arce
2017-12-15 11:25:21 -03:00
committed by GitHub
parent a68fd85ab0
commit ae344c89c5
@@ -369,14 +369,14 @@ namespace Barotrauma
}
}));
commands.Add(new Command("giveperm|giveperms", "giveperm [id]: Grants administrative permissions to the player with the specified client ID.", (string[] args) =>
commands.Add(new Command("giveperm", "giveperm [id]: Grants administrative permissions to the player with the specified client ID.", (string[] args) =>
{
if (GameMain.Server == null) return;
if (args.Length < 1)
{
NewMessage("giveperm [id]: Grants administrative permissions to the player with the specified client ID.", Color.Cyan);
return;
}
if (args.Length < 1)
{
NewMessage("giveperm [id]: Grants administrative permissions to the player with the specified client ID.", Color.Cyan);
return;
}
int id;
int.TryParse(args[0], out id);
@@ -387,12 +387,12 @@ namespace Barotrauma
return;
}
NewMessage("Valid permissions are:",Color.White);
NewMessage(" - all",Color.White);
foreach (ClientPermissions permission in Enum.GetValues(typeof(ClientPermissions)))
{
NewMessage(" - " + permission.ToString(),Color.White);
}
NewMessage("Valid permissions are:",Color.White);
NewMessage(" - all",Color.White);
foreach (ClientPermissions permission in Enum.GetValues(typeof(ClientPermissions)))
{
NewMessage(" - " + permission.ToString(),Color.White);
}
ShowQuestionPrompt("Permission to grant to \"" + client.Name + "\"?", (perm) =>
{
ClientPermissions permission = ClientPermissions.None;
@@ -402,11 +402,11 @@ namespace Barotrauma
}
else
{
if (!Enum.TryParse<ClientPermissions>(perm, out permission))
{
ThrowError("\"" + perm + "\" sn't a valid permission!");
return;
}
if (!Enum.TryParse<ClientPermissions>(perm, out permission))
{
ThrowError("\"" + perm + "\" sn't a valid permission!");
return;
}
}
client.SetPermissions(client.Permissions | permission);
GameMain.Server.UpdateClientPermissions(client);
@@ -414,14 +414,14 @@ namespace Barotrauma
});
}));
commands.Add(new Command("revokeperm|revokeperms", "revokeperm [id]: Revokes administrative permissions to the player with the specified client ID.", (string[] args) =>
commands.Add(new Command("revokeperm", "revokeperm [id]: Revokes administrative permissions to the player with the specified client ID.", (string[] args) =>
{
if (GameMain.Server == null) return;
if (args.Length < 1)
{
NewMessage("revokeperm [id]: Revokes administrative permissions to the player with the specified client ID.", Color.Cyan);
return;
}
{
NewMessage("revokeperm [id]: Revokes administrative permissions to the player with the specified client ID.", Color.Cyan);
return;
}
int id;
int.TryParse(args[0], out id);
@@ -432,12 +432,12 @@ namespace Barotrauma
return;
}
NewMessage("Valid permissions are:", Color.White);
NewMessage(" - all", Color.White);
foreach (ClientPermissions permission in Enum.GetValues(typeof(ClientPermissions)))
{
NewMessage(" - " + permission.ToString(), Color.White);
}
NewMessage("Valid permissions are:", Color.White);
NewMessage(" - all", Color.White);
foreach (ClientPermissions permission in Enum.GetValues(typeof(ClientPermissions)))
{
NewMessage(" - " + permission.ToString(), Color.White);
}
ShowQuestionPrompt("Permission to revoke from \"" + client.Name + "\"?", (perm) =>
{
ClientPermissions permission = ClientPermissions.None;
@@ -447,11 +447,11 @@ namespace Barotrauma
}
else
{
if (!Enum.TryParse<ClientPermissions>(perm, out permission))
{
ThrowError("\"" + perm + "\" isn't a valid permission!");
return;
}
if (!Enum.TryParse<ClientPermissions>(perm, out permission))
{
ThrowError("\"" + perm + "\" isn't a valid permission!");
return;
}
}
client.SetPermissions(client.Permissions & ~permission);
GameMain.Server.UpdateClientPermissions(client);