Allow Torch God's Facor to place biome torch and campfire

This commit is contained in:
SGKoishi 2022-11-06 11:45:02 -08:00
parent a00d5ed2a9
commit bd70495774
No known key found for this signature in database
GPG key ID: 8FFC399070653828
2 changed files with 13 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

@ -17,6 +17,10 @@ Use past tense when adding new entries; sign your name off when you add or chang
## Upcoming changes
* Fixed item giving potentially dropping too many items (@PotatoCider, @punchready)
* Excluded GeoIP.dat from release bundle (@SignatureBeef)
* 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)
* Allowed the use of Aether Monolith (@sgkoishi, #2801)
* Added permission for summoning Mechdusa, Deerclops and slime pet (@sgkoishi, #2808)
## TShock 5.0.0
* Reduced load/save console spam. (@SignatureBeef, @YehnBeep)