tabs to spaces

This commit is contained in:
UnknownShadow200 2017-02-01 16:14:24 +11:00
parent 11c5007898
commit 8b044cc140
31 changed files with 78 additions and 85 deletions

View File

@ -79,8 +79,8 @@ namespace MCGalaxy.Commands {
}
Dictionary<string, SubCommand> subCommands = new Dictionary<string, SubCommand>() {
{ "blockprops", new SubCommand(HandleBlockProps, blockPropskHelp) },
{ "blockproperties", new SubCommand(HandleBlockProps, blockPropskHelp) },
{ "blockprops", new SubCommand(HandleBlockProps, blockPropsHelp) },
{ "blockproperties", new SubCommand(HandleBlockProps, blockPropsHelp) },
{ "env", new SubCommand(HandleEnv, envHelp) },
{ "go", new SubCommand(HandleGoto, gotoHelp) },
{ "kick", new SubCommand(HandleKick, kickHelp) },
@ -136,7 +136,7 @@ namespace MCGalaxy.Commands {
#region Help messages
static string[] blockPropskHelp = new string[] {
static string[] blockPropsHelp = new string[] {
"%T/os blockprops [id] [action] <args> %H- Manages properties for custom blocks on your map.",
"%H See %T/help blockprops %Hfor a list of actions",
};

View File

@ -20,7 +20,6 @@ using System.Collections.Generic;
using System.Data;
using MCGalaxy.DB;
using MCGalaxy.SQL;
using MCGalaxy.Util;
namespace MCGalaxy.Commands {
public sealed class CmdAbout : Command {

View File

@ -33,9 +33,9 @@ namespace MCGalaxy.Generator.Foilage {
/// <summary> Returns true if any green or trunk blocks are in the cube centred at (x, y, z) of extent 'size'. </summary>
public static bool TreeCheck(Level lvl, ushort x, ushort y, ushort z, short size) { //return true if tree is near
for (short dy = (short)-size; dy <= +size; ++dy)
for (short dz = (short)-size; dz <= +size; ++dz)
for (short dx = (short)-size; dx <= +size; ++dx)
for (int dy = -size; dy <= size; ++dy)
for (int dz = -size; dz <= size; ++dz)
for (int dx = -size; dx <= size; ++dx)
{
byte tile = lvl.GetTile((ushort)(x + dx), (ushort)(y + dy), (ushort)(z + dz));
if (tile == Block.trunk || tile == Block.green) return true;

View File

@ -144,6 +144,12 @@ namespace MCGalaxy {
}
/// <summary> Called when min or max rank is changed. </summary>
public abstract void OnPermissionChanged(Player p, Group grp, string type);
/// <summary> Called when a whitelist or blacklist is changed. </summary>
public abstract void OnListChanged(Player p, string name, bool whitelist, bool removedFromOpposite);
bool CheckRank(Player p, LevelPermission perm, string type, bool newPerm) {
if (p != null && perm > p.Rank) {
Player.Message(p, "You cannot change the {0} rank of this level{1} higher than yours.",
@ -154,17 +160,6 @@ namespace MCGalaxy {
return true;
}
/// <summary> Messages all player on the level (and source player) notifying them that the
/// min or max rank changed, rechecks access permissions for all players on the level,
/// and finally saves the level properties file. </summary>
public abstract void OnPermissionChanged(Player p, Group grp, string type);
/// <summary> Messages all player on the level (and source player) notifying them that the
/// target player was whitelisted or blacklisted, rechecks access permissions
/// for all players on the level, and finally saves the level properties file. </summary>
public abstract void OnListChanged(Player p, string name, bool whitelist, bool removedFromOpposite);
/// <summary> Returns true if the player is allowed to modify these access permissions,
/// and is also allowed to change the access permissions for the target player. </summary>
bool CheckList(Player p, string name, bool whitelist) {
@ -183,7 +178,6 @@ namespace MCGalaxy {
/// <summary> Encapuslates access permissions (visit or build) for a level. </summary>
public sealed class LevelAccessController : AccessController {
/// <summary> Whether these access permissions apply to
/// visit (true) or build (false) permission for the level. </summary>
public readonly bool IsVisit;