예제 #1
0
        public override bool CanKillTile(int i, int j, ref bool blockDamaged)
        {
            Tile tile = Framing.GetTileSafely(i, j);

            i -= tile.frameX / 16;
            j -= tile.frameY / 16;
            if (Chest.FindChest(i, j) != -1)
            {
                return(Chest.CanDestroyChest(i, j));
            }

            return(base.CanKillTile(i, j, ref blockDamaged));
        }
        public override bool CanKillTile(int i, int j, ref bool blockDamaged)
        {
            Tile tile = Main.tile[i, j];
            int  left = i;
            int  top  = j;

            if (tile.frameX % 36 != 0)
            {
                left--;
            }
            if (tile.frameY != 0)
            {
                top--;
            }
            return(Chest.CanDestroyChest(left, top));
        }
        public override bool CanKillTile(int tX, int tY, int type, ref bool blockDamaged)
        {
            int  hammock = TileType <GearHammock>();
            Tile tile    = Main.tile[tX, tY];
            Tile below   = Main.tile[tX, tY + 1];

            if (tile.type != hammock && below.type == hammock)
            {
                int left = tX - below.frameX / 18 % 3;
                int top  = tY + 1 + below.frameY / 18;
                if (!Chest.CanDestroyChest(left, top))
                {
                    blockDamaged = false;
                    return(false);
                }
            }
            return(true);
        }