Merge remote-tracking branch 'sgk/pr2811' into general-devel

This commit is contained in:
Lucas Nicodemus 2022-11-09 23:20:19 -08:00
commit 01917d48ed
No known key found for this signature in database
2 changed files with 14 additions and 4 deletions

View file

@ -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;
}
}
}

View file

@ -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)