import plus
import math
import Levels
	
class Level1Quarry(Levels.SuperLevel):
    "Quarry is a level with a quarry in it."
    name = "Level 1 - Quarry"
    preview = "Levels/Level1Quarry/quarry_preview.bmp"
    mission_index = 1
    
    def __init__(self):
        Levels.SuperLevel.__init__(self)

        self.startpoint = (12.5, 60)
        self.startrotation = (math.pi, 0, 0) # yaw pitch roll
        
        self.AddTerrain("resources\\Levels\\Heightmap\\quarryHM.bmp", 128,15, 128, "resources\\Levels\\Ground_Textures\\quarry.tga", "resources\\Levels\\Ground_Textures\\dirt1.tga", 1, 1, "resources\\Levels\\Ground_Textures\\dirt4.tga")
        self.AddTerrainPanels("resources\\Levels\\Ground_Textures\\tile.bmp");

        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Cat_Skinner.bmp", (13.7,0.0,-200.0), (13.7, 0.0, 0.1), 5.5)
        self.AddTerrainEdgeOverlay("Resources\\Levels\\Ground_Textures\\RoadExt_Cat_Skinner.bmp", (118.0,0.0,-200.0), (118.3, 0.0, 0.1), 4.3)

        self.AddSkybox("resources\\Levels\\SkyBox\\sky_left.bmp", "resources\\Levels\\SkyBox\\sky_right.bmp", "resources\\Levels\\SkyBox\\sky_front.bmp", "resources\\Levels\\SkyBox\\sky_back.bmp", "resources\\Levels\\SkyBox\\sky_top.bmp")
        self.AddCloudPlane("resources\\Levels\\SkyBox\\cloud_map1.tga", 165.0, 0.003)
        self.AddSun(0.31, "Resources\\Levels\\Billboards\\Sun.tga", 0.5, 0.7, 0.7, 0.7)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", 1.0, 3.0)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens2.bmp", 2.0, 0.5)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", 3.0, 0.25)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens3.bmp", 8.0, 1.0)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", -2.0, 0.5)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens4.bmp", -4.0, 0.25)
        self.AddLensFlareLayer("Resources\\Levels\\Billboards\\lens1.bmp", -5.5, 0.25)
    
        self.SetTreePlacementBitmap("resources\\Levels\\TreeMaps\\tree_map_level1_b.bmp")
        self.AssignTreeToColor("resources\\Levels\\Billboards\\tree_3.tga", (172, 172, 172), 3.0, 4.3, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\tree_4.tga", (0, 255, 0), 2.0, 4.3, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\tree_2.tga", (255, 0, 0), 3.0, 4.3, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\shrub2.tga", (255, 255, 0), 1.0,1.8, 0, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\pinetree.tga", (0, 0, 255), 1.0,2.8, 1, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\shrub.tga", (255, 255, 255), 1.0,2.8, 0, 25.0)
        self.AssignTreeToColor("resources\\Levels\\Billboards\\TreePannel1.tga", (255, 100, 250), 12.0,12.8, 0, 25.0)
        self.PlaceTrees()
        
        self.AddOctagon(11, 200.0, 25.0)
        self.SetOctagonTexture(0, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(1, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(2, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(3, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(4, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(5, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(6, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(7, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(8, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(9, "Resources\\Levels\\Billboards\\TreePannel1.tga")
        self.SetOctagonTexture(10, "Resources\\Levels\\Billboards\\TreePannel1.tga")

        self.AddHopper(98.0, 82.0, -90.0)
        self.AddDumpZone(45.6, 85.0, 54.1, 90.25)
        import Level1Quarry_features
        Level1Quarry_features.setup(self)
        
        self.DisableBuildingEdgeDetection()
        import Level1Quarry_fence
        Level1Quarry_fence.setup(self)
        self.EnableBuildingEdgeDetection()
        
        fmod = .015
        # static cameras
        self.AddStaticCamera("Static 1", (17.4, 30.2, 110), (.355, 2.16), math.pi / 4)
        self.AddStaticCamera("Static 2", (87.45, 33.8, 33.45), (.3, 5.25), math.pi / 4)
        
        # watch camera
        self.AddWatchCamera("Watch 1", (92.3, 27.87, 109), (2.0, 30.0, fmod*60, fmod*25))
        self.AddWatchCamera("Watch 2", (32, 29, 45), (2.0, 30.0, fmod*60, fmod*25))
        self.AddWatchCamera("Watch 3", (86, 23, 100), (2.0, 30.0, fmod*60, fmod*25))
            
Levels.register(Level1Quarry)