public override void OnKill()
 {
     if (Main.netMode == 1)
     {
         NetHelper.SendSearchAndRefresh(Position.X, Position.Y);
     }
     else
     {
         TEStorageComponent.SearchAndRefreshNetwork(Position);
     }
 }
Beispiel #2
0
 public static int Hook_AfterPlacement(int i, int j, int type, int style, int direction)
 {
     if (Main.netMode == 1)
     {
         NetMessage.SendTileRange(Main.myPlayer, i, j, 1, 1);
         NetHelper.SendSearchAndRefresh(i, j);
         return(0);
     }
     TEStorageComponent.SearchAndRefreshNetwork(new Point16(i, j));
     return(0);
 }
Beispiel #3
0
 public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
 {
     if (fail || effectOnly)
     {
         return;
     }
     StorageComponent.killTile = new Point16(i, j);
     if (Main.netMode == 1)
     {
         NetHelper.SendSearchAndRefresh(StorageComponent.killTile.X, StorageComponent.killTile.Y);
     }
     else
     {
         TEStorageComponent.SearchAndRefreshNetwork(StorageComponent.killTile);
     }
     StorageComponent.killTile = new Point16(-1, -1);
 }
Beispiel #4
0
        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            Item.NewItem(i * 16, j * 16, 32, 32, ItemType(frameX, frameY));
            killTile = new Point16(i, j);
            ModTileEntity tileEntity = GetTileEntity();

            if (tileEntity != null)
            {
                tileEntity.Kill(i, j);
            }
            else
            {
                if (Main.netMode == 1)
                {
                    NetHelper.SendSearchAndRefresh(killTile.X, killTile.Y);
                }
                else
                {
                    TEStorageComponent.SearchAndRefreshNetwork(killTile);
                }
            }
            killTile = new Point16(-1, -1);
        }