// Identity
Name AH-64D Apache
ShortName ApacheAH64

// Item and rendering
Icon ApacheAH64
Model mw.ApacheAH64
Texture AH64Apache
AddDye 8 green
AddDye 2 black
ModelScale 1

// Recipe
AddRecipeParts core 1 advancedMetalCockpit
AddRecipeParts skids 3 wheel
AddRecipeParts blades 4 helicopterBlade
AddRecipeParts rightWing 1 blockRedstone 1 blockIron
AddRecipeParts leftWing 1 blockRedstone 1 blockIron
AddRecipeParts tail 1 metalTail 1 metalPropeller

// Inventory
CargoSlots 0
BombSlots 0
MissileSlots 8
AllowAllAmmo False
AddAmmo Hellfire
FuelTankSize 5000

// Real-world physics
RealMassKg 10433
RealEnginePowerHp 3780
RealMaxSpeedKmh 265
RealRotorDiameterM 14.63
RealClimbRateMs 12.7

// Movement
RestingPitch 0.0
MaxThrottle 3.5
MaxNegativeThrottle 0.0
TurnLeftSpeed 2
TurnRightSpeed 2
LookUpSpeed 2
LookDownSpeed 2
RollLeftSpeed 2
RollRightSpeed 2
Drag 1.0
WheelSpringStrength 0.125
HasGear True

// Weaponry
Mode Heli
Primary Gun
Secondary Missile
ShootDelayPrimary 5
ShootDelaySecondary 20
AlternatePrimary True
AlternateSecondary True
ModePrimary FullAuto
ModeSecondary FullAuto
ShootPointSecondary 45 22 55 rightWing
ShootPointSecondary 45 22 -55 rightWing
ShootPointPrimary 45 22 37 rightWing Hydra70
ShootPointPrimary 45 22 -37 rightWing Hydra70
GunOrigin 1 73 6 0
ReadWeaponsFromGunTypes true

// Health and armour
SetupPart core 2000 -88 16 -25 210 48 50
SetupPart tail 2000 -197 16 -12 108 30 24
SetupPart leftWing 1000 0 8 -63 44 34 38
SetupPart rightWing 1000 0 8 25 44 34 38
SetupPart blades 1000 -147 70 -147 294 16 294
BulletDetection 8
UseRealisticVehicleHealth true

// Seats and geometry
CameraDistance 17.5
WheelPosition 0 48 -10 -27
WheelPosition 1 48 -10 27
WheelPosition 2 -211 12 0
HeliPropeller 0 54 0 0 core Thruster
Pilot 54 32 0
Passengers 1
Passenger 1 83 24 0 core -360 360 -90 5 m60 Gunner

// Sounds and particles
StartSound HelicopterStart
StartSoundLength 100
PropSound Helicopter1
PropSoundLength 93
ShootSoundPrimary RPGShoot
ShootSoundSecondary RocketFire2
