Initial working commit.
This commit is contained in:
parent
073088156c
commit
079541d4c9
3 changed files with 16 additions and 2 deletions
|
|
@ -295,6 +295,19 @@ namespace TShockAPI
|
|||
{
|
||||
args.Player.LastKilledProjectile = 0;
|
||||
}
|
||||
else if (editData == TileID.MysticSnakeRope)
|
||||
{
|
||||
//projectile should be the same X coordinate as all tile places
|
||||
if (!args.Player.RecentlyCreatedProjectiles.Any(p => Main.projectile[p.Index].type == ProjectileID.MysticSnakeCoil &&
|
||||
Math.Abs((int)(Main.projectile[p.Index].position.X / 16f) - tileX) <= Math.Abs(Main.projectile[p.Index].velocity.X)))
|
||||
{
|
||||
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (inconceivable mystic snake rope) {0} {1} {2}", args.Player.Name, action, editData);
|
||||
Console.WriteLine("Bouncer / OnTileEdit rejected from (inconceivable mystic snake rope) {0} {1} {2}", args.Player.Name, action, editData);
|
||||
args.Player.SendTileSquare(tileX, tileY, 1);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (action == EditAction.PlaceTile || action == EditAction.PlaceWall)
|
||||
{
|
||||
if ((action == EditAction.PlaceTile && TShock.Config.PreventInvalidPlaceStyle) &&
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
var response = NetCreativeUnlocksModule.SerializeItemSacrifice(i, amount);
|
||||
NetManager.Instance.SendToClient(response, player.TPlayer.whoAmI);
|
||||
NetManager.Instance.SendToClient(response, player.Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1640,7 +1640,8 @@ namespace TShockAPI
|
|||
if (e.number >= 0 && e.number < Main.projectile.Length)
|
||||
{
|
||||
var projectile = Main.projectile[e.number];
|
||||
if (projectile.active && projectile.owner >= 0 && GetDataHandlers.projectileCreatesLiquid.ContainsKey(projectile.type))
|
||||
if (projectile.active && projectile.owner >= 0 &&
|
||||
(GetDataHandlers.projectileCreatesLiquid.ContainsKey(projectile.type) || GetDataHandlers.projectileCreatesTile.ContainsKey(projectile.type)))
|
||||
{
|
||||
var player = Players[projectile.owner];
|
||||
if (player != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue