diff --git a/MCGalaxy/Chat/ChatTokens.cs b/MCGalaxy/Chat/ChatTokens.cs index 7d6144ceb..357a071f6 100644 --- a/MCGalaxy/Chat/ChatTokens.cs +++ b/MCGalaxy/Chat/ChatTokens.cs @@ -89,7 +89,7 @@ namespace MCGalaxy { string line; while ((line = r.ReadLine()) != null) { if (line.StartsWith("//")) continue; - string[] split = line.Split(new[] { ':' }, 2); + string[] split = line.Split(new[] char{ ':' }, 2); if (split.Length == 2 && !String.IsNullOrEmpty(split[0])) CustomTokens.Add(split[0], split[1]); } diff --git a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs index 80eaea2fc..f9fcd0b97 100644 --- a/MCGalaxy/Commands/CPE/CustomBlockCommand.cs +++ b/MCGalaxy/Commands/CPE/CustomBlockCommand.cs @@ -629,45 +629,45 @@ namespace MCGalaxy.Commands.CPE { static string[][] stepsHelp = new string[][] { null, // step 0 null, // step 1 - new[] { "Type the name for the block." }, - new[] { "Type '0' if the block is a cube, '1' if a sprite (e.g roses)." }, + new string[] { "Type the name for the block." }, + new string[] { "Type '0' if the block is a cube, '1' if a sprite (e.g roses)." }, - new[] { "Type a number between '0' and '255' for the top texture.", + new string[] { "Type a number between '0' and '255' for the top texture.", "Textures in terrain.png are numbered from left to right, increasing downwards", }, - new[] { "Type a number between '0' and '255' for the sides texture.", + new string[] { "Type a number between '0' and '255' for the sides texture.", "Textures in terrain.png are numbered from left to right, increasing downwards.", }, - new[] { "Type a number between '0' and '255' for the bottom texture.", + new string[] { "Type a number between '0' and '255' for the bottom texture.", "Textures in terrain.png are numbered from left to right, increasing downwards.", }, - new[] { "Enter the three minimum coordinates of the cube in units (separated by spaces). 1 block = 16 units.", + new string[] { "Enter the three minimum coordinates of the cube in units (separated by spaces). 1 block = 16 units.", "Minimum coordinates for a normal block are &40 &20 &10." }, - new[] { "Enter the three maximum coordinates of the cube in units (separated by spaces). 1 block = 16 units.", + new string[] { "Enter the three maximum coordinates of the cube in units (separated by spaces). 1 block = 16 units.", "Maximum coordinates for a normal block are &416 &216 &116." }, - new[] { "Type '0' if the block is walk-through.", "Type '1' if the block is swim-through.", + new string[] { "Type '0' if the block is walk-through.", "Type '1' if the block is swim-through.", "Type '2' if the block is solid.", }, - new[] { "Type a number between '0.25' (25% speed) and '3.96' (396% speed).", + new string[] { "Type a number between '0.25' (25% speed) and '3.96' (396% speed).", "This speed is used when inside or walking on the block. Default speed is 1", }, - new[] { "Type 'yes' if the block casts a shadow, 'no' if it doesn't" }, - new[] { "Type a number between '0' and '9' for the sound played when walking on it and breaking.", + new string[] { "Type 'yes' if the block casts a shadow, 'no' if it doesn't" }, + new string[] { "Type a number between '0' and '9' for the sound played when walking on it and breaking.", "0 = None, 1 = Wood, 2 = Gravel, 3 = Grass, 4 = Stone", "5 = Metal, 6 = Glass, 7 = Cloth, 8 = Sand, 9 = Snow", }, - new[] { "Type 'yes' if the block is fully lit (e.g. lava), 'no' if not." }, - new[] { "Enter the block's draw method.", "0 = Opaque, 1 = Transparent (Like glass)", + new string[] { "Type 'yes' if the block is fully lit (e.g. lava), 'no' if not." }, + new string[] { "Enter the block's draw method.", "0 = Opaque, 1 = Transparent (Like glass)", "2 = Transparent (Like leaves), 3 = Translucent (Like ice), 4 = Gas (Like air)", }, - new[] { "Enter the fog density for the block. 0 = No fog at all", + new string[] { "Enter the fog density for the block. 0 = No fog at all", "1 - 255 = Increasing density (e.g. water has 12, lava 255)", }, - new[] { "Enter the fog color (hex color)", }, - new[] { "Enter the fallback block (Block shown to players who can't see custom blocks).", + new string[] { "Enter the fog color (hex color)", }, + new string[] { "Enter the fallback block (Block shown to players who can't see custom blocks).", "You can use any block name or block ID from the normal blocks.", }, }; diff --git a/MCGalaxy/Commands/building/CmdCopy.cs b/MCGalaxy/Commands/building/CmdCopy.cs index 1f38a8088..601bdceeb 100644 --- a/MCGalaxy/Commands/building/CmdCopy.cs +++ b/MCGalaxy/Commands/building/CmdCopy.cs @@ -132,7 +132,11 @@ namespace MCGalaxy.Commands.Building { DrawOp op = new CuboidDrawOp(); op.Flags = BlockDBFlags.Cut; Brush brush = new SolidBrush(Block.air, 0); - Vec3S32[] marks = { new Vec3S32(minX, minY, minZ), new Vec3S32(maxX, maxY, maxZ) }; + + Vec3S32[] marks = new Vec3S32[] { + new Vec3S32(minX, minY, minZ), + new Vec3S32(maxX, maxY, maxZ) + }; DrawOpPerformer.Do(op, brush, p, marks, false); } diff --git a/MCGalaxy/Commands/building/CmdImageprint.cs b/MCGalaxy/Commands/building/CmdImageprint.cs index d7fbd5221..59b0fd1f3 100644 --- a/MCGalaxy/Commands/building/CmdImageprint.cs +++ b/MCGalaxy/Commands/building/CmdImageprint.cs @@ -32,7 +32,7 @@ namespace MCGalaxy.Commands.Building { public override bool museumUsable { get { return false; } } public override LevelPermission defaultRank { get { return LevelPermission.Admin; } } public override CommandAlias[] Aliases { - get { return new[] { new CommandAlias("imgprint"), new CommandAlias("printimg"), + get { return new[] { new CommandAlias("imgprint"), new CommandAlias("printimg"), new CommandAlias("imgdraw"), new CommandAlias("drawimg"), new CommandAlias("drawimage"), new CommandAlias("printimage") }; } } diff --git a/MCGalaxy/Economy/MessageItems.cs b/MCGalaxy/Economy/MessageItems.cs index 21c49bcf1..a114af28e 100644 --- a/MCGalaxy/Economy/MessageItems.cs +++ b/MCGalaxy/Economy/MessageItems.cs @@ -22,7 +22,7 @@ namespace MCGalaxy.Eco { public sealed class LoginMessageItem : SimpleItem { public LoginMessageItem() { - Aliases = new[] { "login", "loginmsg", "loginmessage" }; + Aliases = new string[] { "login", "loginmsg", "loginmessage" }; AllowsNoArgs = true; } @@ -51,7 +51,7 @@ namespace MCGalaxy.Eco { public sealed class LogoutMessageItem : SimpleItem { public LogoutMessageItem() { - Aliases = new[] { "logout", "logoutmsg", "logoutmessage" }; + Aliases = new string[] { "logout", "logoutmsg", "logoutmessage" }; AllowsNoArgs = true; } diff --git a/MCGalaxy/Economy/NameItems.cs b/MCGalaxy/Economy/NameItems.cs index 4e16a241a..b89066841 100644 --- a/MCGalaxy/Economy/NameItems.cs +++ b/MCGalaxy/Economy/NameItems.cs @@ -22,7 +22,7 @@ namespace MCGalaxy.Eco { public sealed class TitleItem : SimpleItem { public TitleItem() { - Aliases = new[] { "titles", "title" }; + Aliases = new string[] { "titles", "title" }; AllowsNoArgs = true; } @@ -51,7 +51,7 @@ namespace MCGalaxy.Eco { public sealed class NickItem : SimpleItem { public NickItem() { - Aliases = new[] { "nickname", "nick", "nicks", "name", "names" }; + Aliases = new string[] { "nickname", "nick", "nicks", "name", "names" }; AllowsNoArgs = true; } @@ -80,7 +80,7 @@ namespace MCGalaxy.Eco { public sealed class TitleColorItem : SimpleItem { public TitleColorItem() { - Aliases = new[] { "tcolor", "tcolors", "titlecolor", "titlecolors", "tc" }; + Aliases = new string[] { "tcolor", "tcolors", "titlecolor", "titlecolors", "tc" }; } public override string Name { get { return "TitleColor"; } } @@ -103,7 +103,7 @@ namespace MCGalaxy.Eco { public sealed class ColorItem : SimpleItem { public ColorItem() { - Aliases = new[] { "colors", "color", "colours", "colour" }; + Aliases = new string[] { "colors", "color", "colours", "colour" }; } public override string Name { get { return "Color"; } } diff --git a/MCGalaxy/Economy/ReviveItem.cs b/MCGalaxy/Economy/ReviveItem.cs index 4b7e754fc..c959dd62f 100644 --- a/MCGalaxy/Economy/ReviveItem.cs +++ b/MCGalaxy/Economy/ReviveItem.cs @@ -24,7 +24,7 @@ namespace MCGalaxy.Eco { public sealed class ReviveItem : SimpleItem { public ReviveItem() { - Aliases = new[] { "revive", "rev" }; + Aliases = new string[] { "revive", "rev" }; Price = 7; } diff --git a/MCGalaxy/Economy/ZombieItems.cs b/MCGalaxy/Economy/ZombieItems.cs index ad65ee8eb..558b09a89 100644 --- a/MCGalaxy/Economy/ZombieItems.cs +++ b/MCGalaxy/Economy/ZombieItems.cs @@ -24,7 +24,7 @@ namespace MCGalaxy.Eco { public sealed class BlocksItem : SimpleItem { public BlocksItem() { - Aliases = new[] { "blocks", "bl", "b" }; + Aliases = new string[] { "blocks", "bl", "b" }; Price = 1; AllowsNoArgs = true; } @@ -55,7 +55,7 @@ namespace MCGalaxy.Eco { public sealed class QueueLevelItem : SimpleItem { public QueueLevelItem() { - Aliases = new[] { "queuelevel", "queuelvl", "queue" }; + Aliases = new string[] { "queuelevel", "queuelvl", "queue" }; Price = 150; } @@ -83,7 +83,7 @@ namespace MCGalaxy.Eco { public sealed class InfectMessageItem : SimpleItem { public InfectMessageItem() { - Aliases = new[] { "infectmessage", "infectmsg" }; + Aliases = new string[] { "infectmessage", "infectmsg" }; Price = 150; } @@ -176,7 +176,7 @@ namespace MCGalaxy.Eco { public sealed class HumanInvisibilityItem : InvisibilityItem { public HumanInvisibilityItem() { - Aliases = new[] { "invisibility", "invisible", "invis" }; + Aliases = new string[] { "invisibility", "invisible", "invis" }; Price = 3; } @@ -189,7 +189,7 @@ namespace MCGalaxy.Eco { public sealed class ZombieInvisibilityItem : InvisibilityItem { public ZombieInvisibilityItem() { - Aliases = new[] { "zinvisibility", "zinvisible", "zinvis" }; + Aliases = new string[] { "zinvisibility", "zinvisible", "zinvis" }; Price = 3; } diff --git a/MCGalaxy/Generator/Foliage/AshTree.cs b/MCGalaxy/Generator/Foliage/AshTree.cs index 32e26bf44..31ac021d3 100644 --- a/MCGalaxy/Generator/Foliage/AshTree.cs +++ b/MCGalaxy/Generator/Foliage/AshTree.cs @@ -60,12 +60,12 @@ namespace MCGalaxy.Generator.Foliage { int branchMax = branchStart + rnd.Next(3, maxBranchHeight); int R = clusterSize; - Vec3S32[] marks = new [] { + Vec3S32[] marks = new Vec3S32[] { new Vec3S32(x + dx - R, y + branchMax - R, z + dz - R), new Vec3S32(x + dx + R, y + branchMax + R, z + dz + R) }; DrawOp op = new EllipsoidDrawOp(); - Brush brush = new RandomBrush(new [] { new ExtBlock(Block.leaf, 0) }); + Brush brush = new RandomBrush(new ExtBlock[] { new ExtBlock(Block.leaf, 0) }); op.SetMarks(marks); op.Perform(marks, brush, b => output(b.X, b.Y, b.Z, b.Block)); diff --git a/MCGalaxy/Generator/Foliage/ForesterTrees.cs b/MCGalaxy/Generator/Foliage/ForesterTrees.cs index 533f21e86..50a7d73d8 100644 --- a/MCGalaxy/Generator/Foliage/ForesterTrees.cs +++ b/MCGalaxy/Generator/Foliage/ForesterTrees.cs @@ -338,7 +338,7 @@ namespace MCGalaxy.Generator.Foliage { public override void Prepare() { base.Prepare(); branchslope = 0.382f; - foliage_shape = new [] { 2, 3, 3, 2.5f, 1.6f }; + foliage_shape = new float[] { 2, 3, 3, 2.5f, 1.6f }; trunkradius = trunkradius * 0.8f; trunkheight = TRUNKHEIGHT * trunkheight; } @@ -372,7 +372,7 @@ namespace MCGalaxy.Generator.Foliage { public override void Prepare() { base.Prepare(); branchslope = 0.15f; - foliage_shape = new [] { 3, 2.6f, 2, 1 }; + foliage_shape = new float[] { 3, 2.6f, 2, 1 }; trunkradius = trunkradius * 0.5f; } @@ -395,7 +395,7 @@ namespace MCGalaxy.Generator.Foliage { public override void Prepare() { base.Prepare(); - foliage_shape = new [] { 3.4f, 2.6f }; + foliage_shape = new float[] { 3.4f, 2.6f }; branchslope = 1.0f; trunkradius = trunkradius * 0.382f; trunkheight = trunkheight * 0.9f; diff --git a/MCGalaxy/Server/BackupDB.cs b/MCGalaxy/Server/BackupDB.cs index 4d76f744a..f6c5e294a 100644 --- a/MCGalaxy/Server/BackupDB.cs +++ b/MCGalaxy/Server/BackupDB.cs @@ -164,8 +164,8 @@ namespace MCGalaxy { if (priIndex == -1) return; // Find the name of this column - char[] sepChars = { '\t', ' ' }; // chars that separate part of a column definition - char[] startChars = { '`', '(', ' ', ',', '\t' }; // chars that can start a column definition + char[] sepChars = new char[] { '\t', ' ' }; // chars that separate part of a column definition + char[] startChars = new char[] { '`', '(', ' ', ',', '\t' }; // chars that can start a column definition string before = cmd.Substring(0, priIndex); before = before.Substring(0, before.LastIndexOfAny(sepChars)); // get rid of column type int nameStart = before.LastIndexOfAny(startChars) + 1;