<!--  -->
<LevelInfo
 name = "Presentation HS 13"
 description = "Entering a Space Station."
 tags = "presentation"
 screenshot = "emptylevel.png"
/>

<?lua
  include("stats.oxo")
  include("HUDTemplates3.oxo")
  include("HUDTemplatesFPS.oxo")
  include("templates/lodInformation.oxt")
  include("templates/pickupRepresentationTemplates.oxt")
?>

<?lua
  include("templates/spaceshipAssff.oxt")
  include("templates/spaceshipPirate.oxt")
  include("templates/spaceshipEscort.oxt")
  include("templates/bigship.oxt")
  include("templates/spaceshipTurret.oxt")
  include("templates/spaceshipCollateralDamage.oxt")
  include("templates/FPS.oxt")
  include("templates/HeavyCruiser.oxt")
?>

<Level
  gametype = Deathmatch
>
  <templates>
    <Template link=lodtemplate_default />
  </templates>

  <Scene
    ambientlight = "0.5, 0.5, 0.5"
    skybox       = "Orxonox/skyBoxMoreNebula"
    negativeWorldRange = "-100000, -100000, -100000"
    positiveWorldRange = " 100000,  100000,  100000"
    gravity      = "0,0,0"
    hasPhysics   = true
  >

    <?lua
      include("includes/pickups.oxi")
    ?>

    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
    <SpawnPoint team=0 position="4320,1610,-741" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />


    <StaticEntity position  = "2800,0,0" mass=10000 collisionType=static >
      <attached>
        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
      </attached>
      <collisionShapes>
        <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
        <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
        <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
        <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
        <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
        <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
        <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
        <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
        <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
        <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
        <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
        <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
        <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
      </collisionShapes>
    </StaticEntity>

<!-- Docking  -->
    <Dock position="2830,20,50" roll=0 yaw=0 >
        <animations>
            <MoveToDockingTarget target="fistperson" />
        </animations>
        <effects>
            <DockToShip target="fistperson" />
        </effects>
        <events>
            <execute>
                <EventListener event="dockMe" />
            </execute>

	    <undocking>
		<EventListener event="undockMe" />
	    </undocking>
	
        </events>
        <attached>
	<!-- Trigger for docking with billboard -->
            <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
            <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
            />
	<!-- Trigger for undocking with billboard -->
	    <Billboard position="-2800,-20055,-700" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
	    <DistanceTrigger position="-2800,-20055,-700" distance="150" target="Pawn"
                beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
            />
        </attached>

    </Dock>
    
<!-- FPS Player as destination of the dock -->
    <FpsPlayer template = "fps" radarname = "First Person Player" position = "172,-20000,-676" >
      <attached>
        <DistanceTriggerBeacon name="bcnDestroyer" />
        <DockingTarget name="fistperson" />
      </attached>
    </FpsPlayer>




<!-- Docking  II -->
    <Dock position="-840,-20055,1.8" roll=0 yaw=0 >
        <animations>
            <MoveToDockingTarget target="spaceShip" />
        </animations>
        <effects>
            <DockToShip target="spaceShip" />
        </effects>
        <events>
            <execute>
                <EventListener event="dockMe" />
            </execute>

	    <undocking>
			<EventListener event="undockMe" />
	    </undocking>
	
        </events>
        <attached>
	<!-- Trigger for docking with billboard -->
            <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.3,0.4,0.5" scale=1 />
            <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
                beaconMode="exclude" targetname="bcnSpaceShip" name="dockMe"
            />
	<!-- Trigger for undocking with billboard -->
	    <Billboard position="4140,20055,-295" material="Flares/ringflare2" colour="0.3,0.4,0.5" scale=1 />
	    <DistanceTrigger position="4140,20055,-295" distance="300" target="Pawn"
                beaconMode="identify" targetname="bcnSpaceShip" name="undockMe"
            />
        </attached>

    </Dock>

    <SpaceShip
        template            = "HeavyCruiser"
        team                = "0"
        position            = "3600,-20,-120"
        orientation         = "1,0,0,0"
        health              = "400"
        initialhealth       = "400"
        maxhealth           = "500"
        shieldhealth        = "80"
        initialshieldhealth = "80"
        maxshieldhealth     = "120"
        shieldabsorption    = "0.8"
        shieldrechargerate  = "1"
        shieldrechargewaittime = "1"
        name                = "Tanis1"
        radarname           = "Tanis Cruiser" >
      <attached>
        <DockingTarget name="spaceShip" />
        <DistanceTriggerBeacon name="bcnSpaceShip" />
      </attached>
    </SpaceShip>




<!-- SpaceStation

The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.

-->
  <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 pitch=-90>
      <attached>
    <Model position="0,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
	<Model position="500,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
	<Model position="1200,0,0" mesh="ss_tube_x.mesh" scale3D="100,100,100" />
	<Model position="1900,0,0" mesh="ss_curve.mesh" scale3D="100,100,100" />
	<Model position="1200,0,703.5" mesh="ss_curve.mesh" scale3D="100,100,100" />
	<Model position="1805.0,0,-800" mesh="ss_curve.mesh" scale3D="100,100,100" yaw=90 />
	<Model position="1010.0,0,-700.0" mesh="ss_curve.mesh" scale3D="100,100,100" yaw=-180 />
	
	
	<Model position="750,-16,703.5" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
	<Model position="-250,-16,0" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
	<Model position="1200,100,-100" roll=180 mesh="ss_machine.mesh" scale3D="0.15,0.15,0.15" />
	<Model position="-100,100,0" roll=180 mesh="ss_table.mesh" scale3D="25,25,25" />
	<Model position="-300,100,0" roll=180 mesh="ss_table_cracked.mesh" scale3D="25,25,25" />
	<Model position="600,75,0" roll=180 mesh="ss_cylinder.mesh" scale3D="25,25,25" />
	<Model position="300,50,0" roll=180  pitch=20 mesh="ss_chair.mesh" scale3D="20,20,20" />
	<Model position="1000,50,0" roll=180 mesh="ss_wall.mesh" scale3D="20,20,20" />
	<Model position="-830,20,0" roll=180 mesh="ss_flag_aean.mesh" scale3D="40,40,40" />
	
	<!--Model mesh="cube.mesh" mass=10 position="0,-100,0" scale3D="5000,0.5,1000" yaw=0 />
    <Model mesh="cube.mesh" mass=10 position="0,100,0" scale3D="2000,0.5,1000" yaw=0 />
    <!--Model mesh="cube.mesh" mass=10 position="0,0,100" scale3D="5000,100,0.5" yaw=0 />
    <Model mesh="cube.mesh" mass=10 position="0,0,-100" scale3D="5000,100,0.5" yaw=0 /-->
      </attached>
      <collisionShapes>
        <!--BoxCollisionShape position="0,-100,0" halfExtents="5000,0,100" /-->
	    <BoxCollisionShape position="0,100,0" halfExtents="2000,0,1000" />
	    <!--BoxCollisionShape position="0,0,100" halfExtents="5000,100,0" />
	    <BoxCollisionShape position="0,0,-100" halfExtents="5000,100,0" /-->
      </collisionShapes>
  </StaticEntity>

<!--       

-->


  <!--Model position="2820,-20,-160" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_tube.mesh" />
  <Model position="2820,-20,-210" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_tube.mesh" />
  <Model position="2820,-20,-280" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_curve.mesh" />
  <Model position="2820,-100,-270.5" yaw="0" pitch="180" roll="90" scale="10" mesh="ss_curve.mesh" /-->
  
   
<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
<ForceField position="0,-20000,0" mode="homogen" diameter="3000" forcedirection = "0,-500,0" />





<!-- Some more stuff -->

    <!-- triple large belt around the planet  -->
    <?lua
        dofile("includes/asteroidField.lua")
        asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
    ?>
    <?lua
        dofile("includes/asteroidField.lua")
        asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
    ?>
    <?lua
        dofile("includes/asteroidField.lua")
        asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
    ?>

    <Model position="0,-19900,0" mesh="planets/ganymede.mesh" scale="5000" />
    
    

  </Scene>

</Level>