Ejemplo n.º 1
0
        public bool ShouldDrawPropsBelow(IntVec3 c, TerrainGrid terrGrid)
        {
            TerrainDef terrainDef = terrGrid.TerrainAt(c);

            if (terrainDef == null || !terrainDef.IsBiomesBridge() || terrainDef.BiomesBridgeLoopMat() == null || terrainDef.BiomesBridgeRightMat() == null)
            {
                return(false);
            }
            IntVec3 c2 = c;

            c2.z--;
            Map map = base.Map;

            if (!c2.InBounds(map))
            {
                return(false);
            }
            TerrainDef terrainDef2 = terrGrid.TerrainAt(c2);

            if (terrainDef2.IsBiomesBridge())
            {
                return(false);
            }
            if (terrainDef2.passability != Traversability.Impassable && !c2.SupportsStructureType(map, terrainDef.terrainAffordanceNeeded))
            {
                return(false);
            }
            return(true);
        }