Allow Torch God's Facor to place biome torch and campfire
This commit is contained in:
parent
a00d5ed2a9
commit
bd70495774
2 changed files with 13 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue