public override Material MatSingleFor(Thing thing)
        {
            StuffAppearanceDef stuffAppearanceDef = StuffAppearanceDefOf.Smooth;

            if (thing != null && thing.Stuff != null && thing.Stuff.stuffProps.appearance != null)
            {
                stuffAppearanceDef = thing.Stuff.stuffProps.appearance;
            }
            Graphic graphic = this.subGraphics[(int)stuffAppearanceDef.index];

            return(graphic.MatSingleFor(thing));
        }
        protected Material LinkedDrawMatFrom(Thing parent, IntVec3 cell)
        {
            int num  = 0;
            int num2 = 1;

            for (int i = 0; i < 4; i++)
            {
                IntVec3 c = cell + GenAdj.CardinalDirections[i];
                if (ShouldLinkWith(c, parent))
                {
                    num += num2;
                }
                num2 *= 2;
            }
            LinkDirections linkSet = (LinkDirections)num;

            return(MaterialAtlasPool.SubMaterialFromAtlas(subGraphic.MatSingleFor(parent), linkSet));
        }