// Identity
Name Pak-40
ShortName Pak40
Description German Anti-Tank Gun

// Item and rendering
Icon Pak40
Model ww2.Pak40
FlashModel DefaultFlash
Texture pak40
AddDye 5 gray
ModelScale 1.1

// Recipe
AddRecipeParts core 1 tankBarrel 1 gunShield
AddRecipeParts frontLeftWheel 1 largeWheel
AddRecipeParts frontRightWheel 1 largeWheel

// Inventory
FuelTankSize 2000
CargoSlots 0
ShellSlots 5
AddAmmo shell
AddAmmo HEshell
AddAmmo German75APShell
AddAmmo German75HEShell

// Real-world physics
RealMassKg 1425

// Movement
MaxThrottle 0
MaxNegativeThrottle 0
TurnLeftSpeed 0
TurnRightSpeed 0
RealTurnRateDegPerSec 0
WheelRadius 1.0
WheelSpringStrength 0.5
FourWheelDrive true
Tank true

// Weaponry
BarrelPosition 52.8 6.6 0
ShootDelay 1
ShellDelay 110
TurretRotationSpeed 0.02
DamageModifierPrimary 44
ShootDelayPrimarySeconds 5
ReadWeaponsFromGunTypes true

// Optics
hasScope true
Gunsight official_stug
gunsightZoom 4.5

// Health and armour
SetupPart core 1500 -40 -8 -18 60 24 36
SetupPart leftTrack 1200 1.1 -9.9 -12.1 15.4 15.4 3.3
SetupPart rightTrack 1200 1.1 -9.9 13.2 15.4 15.4 3.3
BulletDetection 7
ArmorFrontMm 4
ArmorSideMm 0
ArmorRearMm 0
ArmorTopMm 0
ArmorBottomMm 0
UseRealisticVehicleHealth true

// Seats and geometry
CameraDistance 7.5
WheelPosition 0 -32 -10 -18
WheelPosition 1 -32 -10 18
WheelPosition 2 20 -10 18
WheelPosition 3 20 -10 -18
Driver 0 -2 0 -15 15 -10 10
RotatedDriverOffset -8 0 -12
Passengers 0

// Sounds and particles
StartSound
StartSoundLength 0
EngineSound
EngineSoundLength 0
ShootSoundPrimary shoot_75mmde
ShootParticlesPrimary largeexplode 0 0 0
ShootParticlesPrimary explode 1.0 0 0
ShootParticlesPrimary flansmod.fmflame 1.25 0 0
ShootParticlesPrimary flansmod.fmflame 0.68 0.07 0.09
ShootParticlesPrimary flansmod.fmflame 0.64 -0.07 -0.09
ShootParticlesPrimary largesmoke 0.4 0.08 0.1
ShootParticlesPrimary largesmoke 0.38 -0.08 -0.1
ShootParticlesPrimary cloud 0.06 0 0
