// ------------------------------------------------------ Naming ------------------------------------------------------
Name Yakovlev Yak-28P Firebar
ShortName Yak-28P
// ------------------------------------------------------ Visuals ------------------------------------------------------
Icon iconyak28p
Model russia.yak28p
Texture yak28p
//Third Person Camera Distance
CameraDistance 15.0
//Resting Pitch. Set this so the plane spawns level. It will fall onto its collision boxes automatically, but this lets you start it flat
RestingPitch 0.0
HasGear True
ModelScale 1
// ------------------------------------------------------ Movement ------------------------------------------------------
//Mode : One of Plane, Heli or VTOL. The VTOL has a toggle button that switches some model aesthetics and the flight mode
Mode Plane
//Throttle
MaxThrottle 0.75
MaxNegativeThrottle 0.0
//Yaw modifiers
TurnLeftSpeed 1.5
TurnRightSpeed 1.5
//Pitch modifiers
LookUpSpeed 2.2
LookDownSpeed 2.2
//Roll modifiers
RollLeftSpeed 3.0
RollRightSpeed 3.0
//Drag 1.0 is standard. Modify to make the plane / heli more or less sluggish
Drag 0.37
//Lift (A lift : mass ratio of 1 : 1 should keep the plane perfectly level at full throttle
Lift 3.2
//Mass (In tons)
Mass 2.7
//Moment of Inertia (in crazy units. Just fiddle with this until you find something nice)
MomentOfInertia 10.0
//More bounciness means the vehicle will bounce more upon going up slopes, but fall through the ground less
//Wheels
NumWheels 3
WheelPosition 0 -115 -10 -14
WheelPosition 1 -115 -10 14
WheelPosition 2 90 -18 0
WheelSpringStrength 0.125
//Propeller <ID> <x> <y> <z> <planePart> <recipeItem>
Propeller 0 54 0 0 core metalPropeller
// ------------------------------------------------------ Weaponry ------------------------------------------------------
//Weapon types. Options are Missile, Bomb, Gun, Shell, None
Primary Gune
Secondary None
//Time between shots in 1/20ths of seconds
ShootDelayPrimary 
ShootDelaySecondary 0
//Whether to alternate or fire all together
AlternatePrimary False
AlternateSecondary False
//Firing modes. One of SemiAuto, FullAuto or Minigun
ModePrimary FullAuto
ModeSecondary FullAuto
//Add shoot origins. These are the points on your vehicle from which bullets / missiles / shells / bombs appear
ShootPointPrimary 0 0 0 core rpd
// ------------------------------------------------------ Inventory ------------------------------------------------------
CargoSlots 0
BombSlots 0
MissileSlots 0
AllowAllAmmo True
AddAmmo mk4Rocket
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 6000
// ------------------------------------------------------ Passengers ------------------------------------------------------
//Driver and Passengers
Pilot 60 13 0
Passengers 1
Passenger 1 36 13 0 core
// ------------------------------------------------------ Sounds ------------------------------------------------------
StartSound PlaneA
StartSoundLength 20
PropSound PlaneB
PropSoundLength 30
ShootSoundPrimary M60Shoot
ShootSoundSecondary RocketFire2
// ------------------------------------------------------ Recipe ------------------------------------------------------
//Each section of the plane may have many parts
//The sections are tailWheel, tail, bay, topWing, leftWingWheel, leftWing, rightWingWheel,
//rightWing, nose, turret, coreWheel, core
AddRecipeParts core 1 advancedMetalCockpit
AddRecipeParts coreWheel 2 wheel
AddRecipeParts nose 1 metalNose
AddRecipeParts rightWing 1 metalWingSmall
AddRecipeParts leftWing 1 metalWingSmall
AddRecipeParts tail 1 metalTail
AddRecipeParts rightWingWheel 1 wheel
AddRecipeParts leftWingWheel 1 wheel
//Dye colours are "black", "red", "green", "brown", "blue", "purple", "cyan", "silver", "gray", "pink", "lime", "yellow", "lightBlue", "magenta", "orange", "white"
AddDye 5 white
AddDye 1 gray
// ------------------------------------------------------ Health and hitboxes ------------------------------------------------------
SetupPart core 76 -96 12 -10 170 22 20
SetupPart tail 34 -186 12 -10 90 22 20
SetupPart leftWing 56 -105 15 -95 80 8 190
BulletDetection 20
//Collision points for breaking wings etc. upon crashing
//RightWing
CollisionPoint 9 10 -80 leftWing
CollisionPoint 9 10 -60 leftWing
CollisionPoint 9 10 -40 leftWing
CollisionPoint 9 10 -20 leftWing
//LeftWing
CollisionPoint 9 10 80 leftWing
CollisionPoint 9 10 60 leftWing
CollisionPoint 9 10 40 leftWing
CollisionPoint 9 10 20 leftWing
//Nose
CollisionPoint 50 15 0 core
CollisionPoint 90 15 0 core
//Tail
CollisionPoint -60 15 0 tail
HasGear True
IsExplosionWhenDestroyed true
CollisionDamageEnable true
CollisionDamageThrottle 0.21
CollisionDamageTimes 30

AddEmitter flansmod.fmsmoke 1 [-90,5,52] [1,1,1] [-3,0,0] 0.05 0.2 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-90,5,52] [1,1,1] [-2,0,0] 0.2 0.5 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-90,5,52] [1,1,1] [-4,0,0] 0.5 0.8 0 1 leftWing

AddEmitter flansmod.fmflame 1 [-90,5,52] [3,1,1] [-1,0,0] 0.5 0.8 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-90,5,52] [3,3,3] [3,0,0] 0.8 2 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-90,5,52] [3,3,3] [3,0,0] 0.8 2 0 1 leftWing
AddEmitter flansmod.fmflame 1 [-90,5,52] [3,3,3] [3,0,0] 0.8 2 0 1 leftWing

AddEmitter flansmod.fmsmoke 1 [-90,5,-52] [1,1,1] [-3,0,0] 0.05 0.2 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-90,5,-52] [1,1,1] [-2,0,0] 0.2 0.5 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-90,5,-52] [1,1,1] [-4,0,0] 0.5 0.8 0 1 rightWing

AddEmitter flansmod.fmflame 1 [-90,5,-52] [3,1,1] [-1,0,0] 0.5 0.8 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-90,5,-52] [3,3,3] [3,0,0] 0.8 2 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-90,5,-52] [3,3,3] [3,0,0] 0.8 2 0 1 rightWing
AddEmitter flansmod.fmflame 1 [-90,5,-52] [3,3,3] [3,0,0] 0.8 2 0 1 rightWing