Quick fix for last commit.

This commit is contained in:
UnknownShadow200 2016-07-20 17:21:35 +10:00
parent 1a4acd6c9b
commit 95284fab2e
4 changed files with 8 additions and 6 deletions

View File

@ -25,7 +25,7 @@ namespace MCGalaxy.Commands {
public override string name { get { return "report"; } }
public override string shortcut { get { return ""; } }
public override string type { get { return CommandTypes.Other; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return true; } }
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
public override CommandPerm[] ExtraPerms {

View File

@ -26,7 +26,7 @@ namespace MCGalaxy.Commands {
public sealed class CmdServer : Command {
public override string name { get { return "server"; } }
public override string shortcut { get { return "serv"; } }
public override string type { get { return CommandTypes.Other; } }
public override string type { get { return CommandTypes.Moderation; } }
public override bool museumUsable { get { return true; } }
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public CmdServer() { }

View File

@ -75,14 +75,16 @@ namespace MCGalaxy.Generator {
return false;
}
int index = 0, oneY = lvl.Width * lvl.Height;
int index = 0, oneY = lvl.Width * lvl.Length;
using (bmp) {
for (int z = 0; z < bmp.Height; z++)
for (int x = 0; x < bmp.Width; x++)
{
int height = bmp.GetPixel(x, z).R * lvl.Height / 255;
for (int y = 0; y < height; y++)
lvl.blocks[index + oneY * y] = Block.stone;
for (int y = 0; y < height - 1; y++)
lvl.blocks[index + oneY * y] = Block.dirt;
if (height > 0)
lvl.blocks[index + oneY * (height -1)] = Block.grass;
index++;
}
}

View File

@ -93,7 +93,7 @@ namespace MCGalaxy {
users.Clear();
}
public bool IsConnected() { return connection != null && connection.Connected; }
public bool IsConnected() { return connection != null && connection.Connected; }
static string ConvertMessage(string message, bool color) {