Merge pull request #1242 from ProfessorXZ/general-devel

Fixes #1241
This commit is contained in:
White 2016-07-23 10:04:44 +09:30 committed by GitHub
commit 08830f50c6
2 changed files with 11 additions and 3 deletions

View file

@ -2045,6 +2045,14 @@ namespace TShockAPI
args.Player.SendTileSquare(tileX, tileY, 4);
return true;
}
// Using the actuation accessory can lead to actuator hacking
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.");
return true;
}
if (TShock.Itembans.ItemIsBanned(selectedItem.name, args.Player) || editData >= (action == EditAction.PlaceTile ? Main.maxTileSets : Main.maxWallTypes))
{
args.Player.SendTileSquare(tileX, tileY, 4);
@ -2101,8 +2109,8 @@ namespace TShockAPI
}
else if (action == EditAction.PlaceActuator)
{
// If they aren't selecting the actuator, they're hacking.
if (selectedItem.type != ItemID.Actuator)
// If they aren't selecting the actuator and don't have the Presserator equipped, they're hacking.
if (selectedItem.type != ItemID.Actuator && !args.Player.TPlayer.autoActuator)
{
args.Player.SendTileSquare(tileX, tileY, 1);
return true;

View file

@ -1341,7 +1341,7 @@ namespace TShockAPI
}
catch (Exception ex)
{
Log.ConsoleError("An exeption occurred executing a command.");
Log.ConsoleError("An exception occurred executing a command.");
Log.Error(ex.ToString());
}
}