TShock
TShock copied to clipboard
Orange Pressure Plate not being destroyed after use
- TShock version: 4.4.0
- TShock build number (if known): Pre15
Reproduction steps (if applicable)?
- Put down an orange pressure plate.
- Step on it
- Pressure Plate still persists and is usable
Any stack traces or error messages (if known)?
2020-12-28 12:31:05 - TextLog: VERBOSE: Bouncer / OnTileEdit rejected from (pick) Rohurd KillTile 0
Error thrown in TShockAPI/Bouncer.cs (line 307):
// If the tile is a pickaxe tile and they aren't selecting a pickaxe, they're hacking.
// Item frames can be modified without pickaxe tile.
//also add an exception for snake coils, they can be removed when the player places a new one or after x amount of time
else if (tile.type != TileID.ItemFrame && tile.type != TileID.MysticSnakeRope
&& !Main.tileAxe[tile.type] && !Main.tileHammer[tile.type] && tile.wall == 0 && args.Player.TPlayer.mount.Type != 8 && selectedItem.pick == 0 && selectedItem.type != ItemID.GravediggerShovel && !ItemID.Sets.Explosives[selectedItem.netID] && args.Player.RecentFuse == 0)
{
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (pick) {0} {1} {2}", args.Player.Name, action, editData);
args.Player.SendTileSquare(tileX, tileY, 4);
args.Handled = true;
return;
}
Any screenshots?
Any log messages from files that end in .log
or .txt
? What are the last 100 log messages from the server console?
2020-12-28 12:31:05 - TextLog: VERBOSE: Bouncer / OnTileEdit rejected from (pick) Rohurd KillTile 0
What plugins and what versions of those plugins are you running?
None. Vanilla TShock.
Suggested Solution
Add orange pressure plate to exception for being checked if player holds a pickaxe (like item frame and snake coil)
I've lost the log files now but a similar thing happens with landmines
https://user-images.githubusercontent.com/41360489/114582477-3360e800-9cb3-11eb-9717-60a75c414672.mp4
I believe this is the commit that broke it
@Arthri Is the landmine behaviour still the case on newest builds? While poking around SendTileRect code in both the stock game and tShock, it appears this has been fixed some time ago at least: https://github.com/Pryaxis/TShock/blob/general-devel/TShockAPI/Handlers/SendTileRectHandler.cs#L239
If it's an issue still, please create a new one so we can tag it properly and resolve it when possible