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 66d2477f..ff8790a0 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -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; } diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 355d3c7a..987d1ad3 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -665,7 +665,6 @@ namespace TShockAPI Regions.Reload(); Warps.ReloadWarps(); - Lighting.lightMode = 2; ComputeMaxStyles(); FixChestStacks(); diff --git a/TerrariaServerAPI b/TerrariaServerAPI index 2eddc7f5..f176cdff 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit 2eddc7f5a2890e89f1a776d45fa8f67e60c731f4 +Subproject commit f176cdfffc1d80b4f7e5b875ffd247e4aa6d03db