Merge pull request #1355 from DogooFalchion/rope_coils
Add rope coils and the ropes they place to the tile create exceptions.
This commit is contained in:
commit
1982a2484d
1 changed files with 10 additions and 1 deletions
|
|
@ -1940,6 +1940,14 @@ namespace TShockAPI
|
||||||
{ ProjectileID.CrimsandBallGun, TileID.Crimsand },
|
{ ProjectileID.CrimsandBallGun, TileID.Crimsand },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static Dictionary<int, int> ropeCoilPlacements = new Dictionary<int, int>
|
||||||
|
{
|
||||||
|
{ItemID.RopeCoil, TileID.Rope},
|
||||||
|
{ItemID.SilkRopeCoil, TileID.SilkRope},
|
||||||
|
{ItemID.VineRopeCoil, TileID.VineRope},
|
||||||
|
{ItemID.WebRopeCoil, TileID.WebRope}
|
||||||
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extra place style limits for strange hardcoded values in Terraria
|
/// Extra place style limits for strange hardcoded values in Terraria
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -2115,7 +2123,8 @@ namespace TShockAPI
|
||||||
|
|
||||||
// If they aren't selecting the item which creates the tile or wall, they're hacking.
|
// If they aren't selecting the item which creates the tile or wall, they're hacking.
|
||||||
if (!(selectedItem.netID == ItemID.IceRod && editData == TileID.MagicalIceBlock) &&
|
if (!(selectedItem.netID == ItemID.IceRod && editData == TileID.MagicalIceBlock) &&
|
||||||
editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall))
|
(editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall) &&
|
||||||
|
!(ropeCoilPlacements.ContainsKey(selectedItem.netID) && editData == ropeCoilPlacements[selectedItem.netID])))
|
||||||
{
|
{
|
||||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue