// ------------------------------------------------------------------
// Deployable camera script
//
// Cameras will occupy grenade slots vice backpack slots. The player
// will "throw" them like grenades, and they should stick to (and
// deploy on) interior surfaces and terrain.
// ------------------------------------------------------------------

// ------------------------------------------
// other datablocks
// ------------------------------------------

datablock ItemData(CameraGrenadeThrown)
{
   shapeFile = "camera.dts";
   mass = 0.7;
   elasticity = 0.2;
   friction = 1;
   pickupRadius = 2;
   maxDamage = 0.8;
   sticky = true;
   emap = true;

   scale = "0.7 0.7 0.7";
   
};

datablock ItemData(CameraGrenade)
{
   className = HandInventory;
   catagory = "Handheld";
   shapeFile = "camera.dts";
   mass = 0.7;
   elasticity = 0.2;
   friction = 1;
   pickupRadius = 2;
   thrownItem = CameraGrenadeThrown;
   pickUpName = "a deployable camera";

   trueMass = 0.08;

   scale = "0.6 0.6 0.6";

   computeCRC = true;
   emap = true;
};

datablock SensorData(CameraSensorObject)
{
   detects = true;
   detectsUsingLOS = true;
   detectionPings = false;
   detectsPassiveJammed = true;
   detectRadius = 40;
   detectsFOVOnly = true;
   useObjectFOV = true;
};

datablock TurretData(TurretDeployedCamera) : TurretDamageProfile
{
   className = CameraTurret;
   shapeFile = "camera.dts";

   scale = "0.6 0.6 0.6";

   mass = 0.7;
   maxDamage = 0.2;
   destroyedLevel = 0.2;
   disabledLevel = 0.2;
   repairRate = 0;
   explosion = CameraGrenadeExplosion;

   thetaMin = 0;
   thetaMax = 180;
   //thetaNull = 90;

	deployedObject = true;

   isShielded = false;
   energyPerDamagePoint = 40;
   maxEnergy = 30;
   renderWhenDestroyed = false;
   rechargeRate = 0.05;

   cameraDefaultFov = 150;
   cameraMinFov = 150;
   cameraMaxFov = 150;
   
//   neverUpdateControl = true;

   canControl = true;
   canObserve = true;
   observeThroughObject = true;
   cmdCategory = "DSupport";
   cmdIcon = CMDCameraIcon;
   cmdMiniIconName = "commander/MiniIcons/com_camera_grey";
   targetNameTag = 'Deployed';
   targetTypeTag = 'Camera';
   sensorData = CameraSensorObject;
   sensorRadius = CameraSensorObject.detectRadius;

   firstPersonOnly = true;
   observeParameters = "0.5 4.5 4.5";

   debrisShapeName = "debris_generic_small.dts";
   debris = SmallShapeDebris;
};

datablock TurretImageData(DeployableCameraBarrel)
{
   shapeFile = "turret_muzzlepoint.dts";

   usesEnergy = true;

   // Turret parameters
   activationMS      = 100;
   deactivateDelayMS = 100;
   thinkTimeMS       = 100;
   degPerSecTheta    = 180;
   degPerSecPhi      = 360;
};

