Add config option to enable DCU

This commit is contained in:
Lucas Nicodemus 2015-07-05 14:30:49 -06:00
parent dd58ab8d15
commit 828ee0fde5
2 changed files with 5 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

@ -3035,7 +3035,7 @@ namespace TShockAPI
return false;
}
if (type == BuffID.DrillMount)
if (type == BuffID.DrillMount && TShock.Config.VeryDangerousDoNotChangeEnableDrillContainmentUnit)
{
TShock.Utils.ForceKick(TShock.Players[id], "The Drill Containment Unit is disabled.");
return true;
@ -3335,7 +3335,7 @@ namespace TShockAPI
args.TPlayer.buffTime[i] = 0;
}
if (buff == BuffID.DrillMount)
if (buff == BuffID.DrillMount && TShock.Config.VeryDangerousDoNotChangeEnableDrillContainmentUnit)
{
TShock.Utils.ForceKick(TShock.Players[id], "The Drill Containment Unit is disabled.");
return true;