From f7a1b80337b340270df119dfd11f791c95550c49 Mon Sep 17 00:00:00 2001 From: ProfessorXZ Date: Tue, 19 Jul 2016 00:21:54 +0200 Subject: [PATCH] Use TPlayer.autoActuate instead of IEnumerable.Any() --- TShockAPI/GetDataHandlers.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 6d64915b..146bea59 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2047,7 +2047,7 @@ namespace TShockAPI } // Using the actuation accessory can lead to actuator hacking - if (TShock.Itembans.ItemIsBanned("Actuator", args.Player) && args.Player.Accessories.Any(accessory => accessory != null && accessory.stack > 0 && accessory.type == ItemID.ActuationAccessory)) + if (TShock.Itembans.ItemIsBanned("Actuator", args.Player) && args.Player.TPlayer.autoActuator) { args.Player.SendTileSquare(tileX, tileY, 1); args.Player.SendErrorMessage("You do not have permission to place actuators."); @@ -2110,8 +2110,7 @@ namespace TShockAPI else if (action == EditAction.PlaceActuator) { // If they aren't selecting the actuator and don't have the Presserator equipped, they're hacking. - // ActuationAccessory = The Presserator - if (selectedItem.type != ItemID.Actuator && !args.Player.Accessories.Any(accessory => accessory != null && accessory.stack > 0 && accessory.type == ItemID.ActuationAccessory)) + if (selectedItem.type != ItemID.Actuator && !args.Player.TPlayer.autoActuator) { args.Player.SendTileSquare(tileX, tileY, 1); return true;