From 76db9aacdb192a8040e54c07703779e1c3303805 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 11:48:44 -0600 Subject: [PATCH 1/7] Update submodule --- TerrariaServerAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerrariaServerAPI b/TerrariaServerAPI index 2eddc7f5..621781ea 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit 2eddc7f5a2890e89f1a776d45fa8f67e60c731f4 +Subproject commit 621781ea81a3be1bc657d7e4cf065a695c13d829 From f3c32554933c73d0c8be74509b8d069b081f9b1a Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 11:59:01 -0600 Subject: [PATCH 2/7] Fix build --- TerrariaServerAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerrariaServerAPI b/TerrariaServerAPI index 621781ea..0ca629bc 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit 621781ea81a3be1bc657d7e4cf065a695c13d829 +Subproject commit 0ca629bce767b74a776ace666955067b31ae15a4 From bcea7736ea0f88bd2d8cbb128476539ddae885e1 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 12:10:42 -0600 Subject: [PATCH 3/7] Fix build Alarmingly TShock set a lighting mode that has been removed in API --- TShockAPI/TShock.cs | 1 - 1 file changed, 1 deletion(-) 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(); From 2883bd6de8517a9a83d0eedf646e6b4dc1016b5f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 12:44:39 -0600 Subject: [PATCH 4/7] Update submodule --- TerrariaServerAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerrariaServerAPI b/TerrariaServerAPI index 0ca629bc..afec8ba7 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit 0ca629bce767b74a776ace666955067b31ae15a4 +Subproject commit afec8ba799c7be6cc584ad17a5bf21c5ce783304 From ceac62019c30686a4b9795fccd9943f795e4644e Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 13:48:20 -0600 Subject: [PATCH 5/7] Update submodule --- TerrariaServerAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerrariaServerAPI b/TerrariaServerAPI index afec8ba7..f176cdff 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit afec8ba799c7be6cc584ad17a5bf21c5ce783304 +Subproject commit f176cdfffc1d80b4f7e5b875ffd247e4aa6d03db From dd58ab8d151d7054b5f1addf1abcce4d3653b79f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 14:27:46 -0600 Subject: [PATCH 6/7] Force disable the DCU --- TShockAPI/GetDataHandlers.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 0e2c9961..b72030c9 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -3035,6 +3035,12 @@ namespace TShockAPI return false; } + if (type == BuffID.DrillMount) + { + TShock.Utils.ForceKick(TShock.Players[id], "The Drill Containment Unit is disabled."); + return true; + } + args.Player.SendData(PacketTypes.PlayerAddBuff, "", id); return true; } @@ -3328,8 +3334,15 @@ namespace TShockAPI { args.TPlayer.buffTime[i] = 0; } + + if (buff == BuffID.DrillMount) + { + 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; } From 828ee0fde57a51855c2668ca71a1f7d7a427987d Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sun, 5 Jul 2015 14:30:49 -0600 Subject: [PATCH 7/7] 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;