From 828ee0fde57a51855c2668ca71a1f7d7a427987d Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 14:30:49 -0600 Subject: [PATCH] Add config option to enable DCU --- TShockAPI/ConfigFile.cs | 3 +++ TShockAPI/GetDataHandlers.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 20fc0bdf..bde5dad4 100755 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -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; + /// /// Reads a configuration file from a given path /// diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index b72030c9..e615e3bf 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -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;