Fix can't place >>> Booster Track
This commit is contained in:
parent
9182b3b2be
commit
ea180347cb
1 changed files with 7 additions and 3 deletions
|
|
@ -310,6 +310,8 @@ namespace TShockAPI
|
||||||
|
|
||||||
var torchPlaceStyle = args.Player.TPlayer.UsingBiomeTorches
|
var torchPlaceStyle = args.Player.TPlayer.UsingBiomeTorches
|
||||||
? args.Player.TPlayer.BiomeTorchPlaceStyle(0) // using non-0 returns that number
|
? args.Player.TPlayer.BiomeTorchPlaceStyle(0) // using non-0 returns that number
|
||||||
|
: editData == TileID.MinecartTrack && style == 2 && args.Player.TPlayer.direction == 1 // Booster Right Track
|
||||||
|
? 3
|
||||||
: selectedItem.placeStyle;
|
: selectedItem.placeStyle;
|
||||||
if (torchPlaceStyle != style)
|
if (torchPlaceStyle != style)
|
||||||
{
|
{
|
||||||
|
|
@ -385,9 +387,11 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
else if (action == EditAction.PlaceTile || action == EditAction.ReplaceTile || action == EditAction.PlaceWall || action == EditAction.ReplaceWall)
|
else if (action == EditAction.PlaceTile || action == EditAction.ReplaceTile || action == EditAction.PlaceWall || action == EditAction.ReplaceWall)
|
||||||
{
|
{
|
||||||
|
var isInvalidPlaceStyle = ExtraneousPlaceStyles.ContainsKey(editData)
|
||||||
|
? style > ExtraneousPlaceStyles[editData]
|
||||||
|
: MaxPlaceStyles.ContainsKey(editData) && style > MaxPlaceStyles[editData];
|
||||||
if ((action == EditAction.PlaceTile && TShock.Config.Settings.PreventInvalidPlaceStyle) &&
|
if ((action == EditAction.PlaceTile && TShock.Config.Settings.PreventInvalidPlaceStyle) &&
|
||||||
((MaxPlaceStyles.ContainsKey(editData) && style > MaxPlaceStyles[editData]) ||
|
isInvalidPlaceStyle)
|
||||||
(ExtraneousPlaceStyles.ContainsKey(editData) && style > ExtraneousPlaceStyles[editData])))
|
|
||||||
{
|
{
|
||||||
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (ms1) {0} {1} {2}", args.Player.Name, action, editData);
|
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (ms1) {0} {1} {2}", args.Player.Name, action, editData);
|
||||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue