diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 9ef0471c..8d3d7636 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -2303,10 +2303,15 @@ namespace TShockAPI if (args.Player.SelectedItem.placeStyle != style) { - TShock.Log.ConsoleError(GetString("Bouncer / OnPlaceObject rejected object placement with invalid style from {0}", args.Player.Name)); - args.Player.SendTileSquareCentered(x, y, 4); - args.Handled = true; - return; + var validTorch = args.Player.SelectedItem.createTile == TileID.Torches && args.Player.TPlayer.BiomeTorchPlaceStyle(args.Player.SelectedItem.placeStyle) == style; + var validCampfire = args.Player.SelectedItem.createTile == TileID.Campfire && args.Player.TPlayer.BiomeCampfirePlaceStyle(args.Player.SelectedItem.placeStyle) == style; + if (!args.Player.TPlayer.unlockedBiomeTorches || (!validTorch && !validCampfire)) + { + TShock.Log.ConsoleError(GetString("Bouncer / OnPlaceObject rejected object placement with invalid style {1} (expected {2}) from {0}", args.Player.Name, style, args.Player.SelectedItem.placeStyle)); + args.Player.SendTileSquareCentered(x, y, 4); + args.Handled = true; + return; + } } } diff --git a/docs/changelog.md b/docs/changelog.md index 6d9e56d1..508abd84 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -89,6 +89,11 @@ Use past tense when adding new entries; sign your name off when you add or chang * This change allows the config option `RequireLogin` to function usefully again when SSC is not enabled. * Changed `PlayerData.RestoreCharacter` to remove all buffs. (@drunderscore) * Before this change, it was theoretically possible to smuggle buffs onto servers with SSC enabled, by using buff indexes past `22`. +* Fixed item giving potentially dropping too many items (@PotatoCider, @punchready) +* Excluded GeoIP.dat from release bundle (@SignatureBeef) +* Added `TownSlimeRed` to `FishableNpcIDs` list, allowing it to be fished up (@drunderscore) +* Allowed Torch God's Favor to place different types of torches and campfires (@sgkoishi, #2811) +* Allowed Crystal Shard to grow (@sgkoishi, @cc004, SignatureBeef/Open-Terraria-API#96) ## TShock 5.0.0 * Reduced load/save console spam. (@SignatureBeef, @YehnBeep)