diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cfa114d..04bc68f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Fixed the issue where players were unable to place regular ropes because of the valid placement being caught in Bouncer OnTileEdit. (@Patrikkk) * Remove checks that prevented people placing personal storage tiles in SSC as the personal storage is synced with the server.(@Patrikkk) * Cleaned up a check in Bouner OnTileEdit where it checks for using the respective item when placing a tile to make it clearer. This change also fixed the issue in a previous commit where valid replace action was caught. Moved the check for max tile/wall types to the beginning of the method. (@Patrikkk) +* Improved clarity for insufficient permission related error messages. (@moisterrific) * Remove redundant Boulder placement check that prevented placing chests on them, as it is no longer possible to place a chest on a boulder, so nothing crashes the server. "1.2.3: Boulders with Chests on them no longer crash the game if the boulder is hit." (@kevzhao2, @Patrikkk) ## TShock 4.4.0 (Pre-release 11) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 931167c0..4a1c90fd 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2628,7 +2628,7 @@ namespace TShockAPI if (Main.npc[id].townNPC && !args.Player.HasPermission(Permissions.hurttownnpc)) { - args.Player.SendErrorMessage("You do not have permission to hurt this NPC."); + args.Player.SendErrorMessage("You do not have permission to hurt Town NPCs."); args.Player.SendData(PacketTypes.NpcUpdate, "", id); TShock.Log.ConsoleDebug("GetDataHandlers / HandleNpcStrike rejected npc strike {0}", args.Player.Name); return true; @@ -3017,7 +3017,7 @@ namespace TShockAPI if (type == 1 && TShock.Config.DisableDungeonGuardian) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleSpecial rejected type 1 for {0}", args.Player.Name); - args.Player.SendMessage("The Dungeon Guardian returned you to your spawn point", Color.Purple); + args.Player.SendMessage("The Dungeon Guardian returned you to your spawn point.", Color.Purple); args.Player.Spawn(PlayerSpawnContext.RecallFromItem); return true; } @@ -3025,7 +3025,7 @@ namespace TShockAPI if (type == 3 && !args.Player.HasPermission(Permissions.usesundial)) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleSpecial rejected enchanted sundial permission {0}", args.Player.Name); - args.Player.SendErrorMessage("You do not have permission to use the Enchanted Sundial!"); + args.Player.SendErrorMessage("You do not have permission to use the Enchanted Sundial."); return true; } @@ -3070,7 +3070,7 @@ namespace TShockAPI if (!args.Player.HasPermission(Permissions.movenpc)) { TShock.Log.ConsoleDebug("GetDataHandlers / UpdateNPCHome rejected no permission {0}", args.Player.Name); - args.Player.SendErrorMessage("You do not have permission to relocate NPCs."); + args.Player.SendErrorMessage("You do not have permission to relocate Town NPCs."); args.Player.SendData(PacketTypes.UpdateNPCHome, "", id, Main.npc[id].homeTileX, Main.npc[id].homeTileY, Convert.ToByte(Main.npc[id].homeless)); return true; @@ -3097,14 +3097,14 @@ namespace TShockAPI if (bosses.Contains(thingType) && !args.Player.HasPermission(Permissions.summonboss)) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleSpawnBoss rejected boss {0} {1}", args.Player.Name, thingType); - args.Player.SendErrorMessage("You do not have permission to summon a boss."); + args.Player.SendErrorMessage("You do not have permission to summon bosses."); return true; } if (invasions.Contains(thingType) && !args.Player.HasPermission(Permissions.startinvasion)) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleSpawnBoss rejected invasion {0} {1}", args.Player.Name, thingType); - args.Player.SendErrorMessage("You do not have permission to start an invasion."); + args.Player.SendErrorMessage("You do not have permission to start invasions."); return true; } @@ -3302,8 +3302,8 @@ namespace TShockAPI if (type == 0 && !args.Player.HasPermission(Permissions.rod)) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleport rejected rod type {0} {1}", args.Player.Name, type); - args.Player.SendErrorMessage("You do not have permission to teleport."); - args.Player.Teleport(args.TPlayer.position.X, args.TPlayer.position.Y); + args.Player.SendErrorMessage("You do not have permission to teleport using items."); // Was going to write using RoD but Hook of Disonnance and Potion of Return both use the same teleport packet as RoD. + args.Player.Teleport(args.TPlayer.position.X, args.TPlayer.position.Y); // Suggest renaming rod permission unless someone plans to add separate perms for the other 2 tp items. return true; } @@ -3326,7 +3326,7 @@ namespace TShockAPI if (!args.Player.HasPermission(Permissions.wormhole)) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleport rejected p2p wormhole permission {0} {1}", args.Player.Name, type); - args.Player.SendErrorMessage("You do not have permission to teleport."); + args.Player.SendErrorMessage("You do not have permission to teleport using Wormhole Potions."); args.Player.Teleport(args.TPlayer.position.X, args.TPlayer.position.Y); return true; } @@ -3597,7 +3597,7 @@ namespace TShockAPI if (!args.Player.HasPermission(Permissions.startdd2)) { TShock.Log.ConsoleDebug("GetDataHandlers / HandleOldOnesArmy rejected permissions {0}", args.Player.Name); - args.Player.SendErrorMessage("You do not have permission to start the Old One's Army event."); + args.Player.SendErrorMessage("You do not have permission to start the Old One's Army."); return true; } diff --git a/TShockAPI/Handlers/NetModules/PylonHandler.cs b/TShockAPI/Handlers/NetModules/PylonHandler.cs index 75ca0c1d..7cbe054b 100644 --- a/TShockAPI/Handlers/NetModules/PylonHandler.cs +++ b/TShockAPI/Handlers/NetModules/PylonHandler.cs @@ -51,7 +51,7 @@ namespace TShockAPI.Handlers.NetModules if (!player.HasPermission(Permissions.pylon)) { rejectPacket = true; - player.SendErrorMessage("You do not have permission to teleport with pylons."); + player.SendErrorMessage("You do not have permission to teleport using pylons."); return; } }