Merge branch 'general-devel' of https://github.com/NyxStudios/TShock into general-devel

This commit is contained in:
Enerdy 2015-07-05 21:50:26 +01:00
commit e8b4cf1aa5
4 changed files with 17 additions and 2 deletions

View file

@ -433,6 +433,9 @@ namespace TShockAPI
[Description("The minimum password length for new user accounts. Minimum value is 4.")]
public int MinimumPasswordLength = 4;
[Description("Enable the DCU. Very dangerous; can destroy world without consequence.")] public bool
VeryDangerousDoNotChangeEnableDrillContainmentUnit = false;
/// <summary>
/// Reads a configuration file from a given path
/// </summary>

View file

@ -3039,6 +3039,12 @@ namespace TShockAPI
return false;
}
if (type == BuffID.DrillMount && TShock.Config.VeryDangerousDoNotChangeEnableDrillContainmentUnit)
{
TShock.Utils.ForceKick(TShock.Players[id], "The Drill Containment Unit is disabled.");
return true;
}
args.Player.SendData(PacketTypes.PlayerAddBuff, "", id);
return true;
}
@ -3332,8 +3338,15 @@ namespace TShockAPI
{
args.TPlayer.buffTime[i] = 0;
}
if (buff == BuffID.DrillMount && TShock.Config.VeryDangerousDoNotChangeEnableDrillContainmentUnit)
{
TShock.Utils.ForceKick(TShock.Players[id], "The Drill Containment Unit is disabled.");
return true;
}
}
NetMessage.SendData((int) PacketTypes.PlayerBuff, -1, args.Player.Index, "", args.Player.Index);
return true;
}

View file

@ -665,7 +665,6 @@ namespace TShockAPI
Regions.Reload();
Warps.ReloadWarps();
Lighting.lightMode = 2;
ComputeMaxStyles();
FixChestStacks();