Example #1
0
 public static void MakeSignPost(int x, int y, int z, string strSignText)
 {
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strRandomSign = Utils.TextToSign(strSignText);
     tes.Text1 = strRandomSign[0];
     tes.Text2 = strRandomSign[1];
     tes.Text3 = strRandomSign[2];
     tes.Text4 = strRandomSign[3];
     _bmDest.SetTileEntity(x, y, z, tes);
 }
Example #2
0
 public static void MakeSign(int x, int y, int z, string strSignText, int intBlockAgainst)
 {
     bm.SetID(x, y, z, (int)BlockType.WALL_SIGN);
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strRandomSign = TextToSign(strSignText);
     tes.Text1 = strRandomSign[0];
     tes.Text2 = strRandomSign[1];
     tes.Text3 = strRandomSign[2];
     tes.Text4 = strRandomSign[3];
     bm.SetTileEntity(x, y, z, tes);
     bm.SetData(x, y, z, BlockDirectionLadderSign(x, y, z, intBlockAgainst));
 }
Example #3
0
        public TileEntitySign(TileEntity te)
            : base(te)
        {
            TileEntitySign tes = te as TileEntitySign;

            if (tes != null)
            {
                _text1 = tes._text1;
                _text2 = tes._text2;
                _text3 = tes._text3;
                _text4 = tes._text4;
            }
        }
Example #4
0
 public static void MakeSign(int x, int y, int z, string strSignText, int intBlockAgainst, int intMirror)
 {
     _bmDest.SetID(x, y, z, BlockInfo.WallSign.ID);
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strSign = Utils.TextToSign(strSignText);
     tes.Text1 = strSign[0];
     tes.Text2 = strSign[1];
     tes.Text3 = strSign[2];
     tes.Text4 = strSign[3];
     _bmDest.SetTileEntity(x, y, z, tes);
     _bmDest.SetData(x, y, z, BlockDirectionLadderSign(x, y, z, intBlockAgainst));
     if (intMirror > 0)
     {
         MakeSign(City.MapLength - x, y, z, strSignText, intBlockAgainst, 0);
         MakeSign(x, y, City.MapLength - z, strSignText, intBlockAgainst, 0);
         MakeSign(City.MapLength - x, y, City.MapLength - z, strSignText, intBlockAgainst, 0);
         if (intMirror == 2)
         {
             MakeSign(z, y, x, strSignText, intBlockAgainst, 1);
         }
     }
 }
Example #5
0
 private static void MakeSign(int x, int y, int z, string strSignText, int intBlockAgainst)
 {
     bm.SetID(x, y, z, (int)BlockType.WALL_SIGN);
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strRandomSign = strSignText.Split('|');
     for (int a = 0; a <= 3; a++)
     {
         while (strRandomSign[a].Length < 12)
         {
             strRandomSign[a] += ' ';
             if (strRandomSign[a].Length < 12)
             {
                 strRandomSign[a] = ' ' + strRandomSign[a];
             }
         }
     }
     tes.Text1 = strRandomSign[0];
     tes.Text2 = strRandomSign[1];
     tes.Text3 = strRandomSign[2];
     tes.Text4 = strRandomSign[3];
     bm.SetTileEntity(x, y, z, tes);
     bm.SetData(x, y, z, BlockShapes.BlockDirection(x, y, z, intBlockAgainst));
 }
Example #6
0
 public static void MakeSignPost(int x, int y, int z, string strSignText)
 {
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strRandomSign = Utils.TextToSign(strSignText);
     tes.Text1 = strRandomSign[0];
     tes.Text2 = strRandomSign[1];
     tes.Text3 = strRandomSign[2];
     tes.Text4 = strRandomSign[3];
     _bmDest.SetTileEntity(x, y, z, tes);
 }
Example #7
0
 public static void MakeSign(int x, int y, int z, string strSignText, int intBlockAgainst, int intMirror)
 {
     _bmDest.SetID(x, y, z, BlockType.WALL_SIGN);
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strSign = Utils.TextToSign(strSignText);
     tes.Text1 = strSign[0];
     tes.Text2 = strSign[1];
     tes.Text3 = strSign[2];
     tes.Text4 = strSign[3];
     _bmDest.SetTileEntity(x, y, z, tes);
     _bmDest.SetData(x, y, z, BlockDirectionLadderSign(x, y, z, intBlockAgainst));
     if (intMirror > 0)
     {
         MakeSign(_intMapSize - x, y, z, strSignText, intBlockAgainst, 0);
         MakeSign(x, y, _intMapSize - z, strSignText, intBlockAgainst, 0);
         MakeSign(_intMapSize - x, y, _intMapSize - z, strSignText, intBlockAgainst, 0);
         if (intMirror == 2)
         {
             MakeSign(z, y, x, strSignText, intBlockAgainst, 1);
         }
     }
 }