#include "../../../../vehicle_init.lua"

Vehicle = {
	Ammunition_Fire_Threshold = 10,
	Ammunition_Detonation_Threshold = 5,

	Language = "russian",
}

Weapons = {
	["52p271"]={

		Name = "52-P-271",
		Caliber = 57, -- mm
		Fire_Rate = 25, -- rounds/min
		Reload_Time = 6.5, -- s
		Weapon_Sound = "cannons/ww2_cannon_close_b_0",
		Reload_Sound = "reloads/reload_generic_medium_0",
		Muzzle_Type = "sphere",
		Recoiling_Barrel = true,
		Recoil_Distance = .4,
		
		Shell_Presets = {
			["57mmbr271"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 1,
				Reserve_Ammo = 20,
			},
			["57mmbr271k"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 1,
				Reserve_Ammo = 20,
			}, 
			["57mmo271"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 1,
				Reserve_Ammo = 20,
			}, 
			
		},

	},

	["bm13"]={

		Name = "BM-13 katyusha",
		Caliber = 132, -- mm
		Accuracy = 0.02, -- from 0 to 1
		Fire_Rate = 120, -- rounds/min
		Reload_Time = 20, -- s
		Weapon_Sound = "rocket_0",
		Reload_Sound = "mgreload",

		Shell_Presets = {
			["m13"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 16,
				Reserve_Ammo = 0,
			},
		},

	},

	["flamethrower"]={

		Name = "Flamethrower",
		Caliber = 114, -- mm
		Accuracy = 0.02, -- from 0 to 1
		Fire_Rate = 1500, -- rounds/min
		Reload_Time = 20, -- s
		Weapon_Sound = "flame_test",
		Reload_Sound = "mgreload",
		
		Day_Presets = {
			[1]={
				img = "sherman_main", -- name of reticle image
				imgscale = 0.7,
				zoom = 20, -- zoom (from 0 to 60)
				ox = 0, -- x offset (pixels)
				oy = 0, -- y offset (pixels)

				type = "analogue", -- digital or analogue

				nv = false,
				ir = false,
			},
			[2]={
				img = "sherman_main",
				imgscale = 1.7,
				zoom = 45,
				ox = 0,
				oy = 0,

				type = "analogue",

				nv = false,
				ir = false,
			},
		},

		Shell_Presets = {
			["napalm"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 2000,
				Reserve_Ammo = 0,
			},
		},
	},
	
	["dt"]={

		Name = "DT",
		Caliber = 7.62, -- mm
		Accuracy = 0.002, -- from 0 to 1
		Fire_Rate = 550, -- rounds/min
		Reload_Time = 10, -- s
		Weapon_Sound = "lmg_0",
		Reload_Sound = "mgreload",
		sight = "d10t",

		Shell_Presets = {
			["762x54"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 47,
				Reserve_Ammo = 3087,
			},
		},

	},

	["pkt"]={

		Name = "PKT",
		Caliber = 7.62, -- mm
		Accuracy = 0.004, -- from 0 to 1
		Fire_Rate = 800, -- rounds/min
		Reload_Time = 10, -- s
		Weapon_Sound = "lmg_0",
		Reload_Sound = "mgreload",
		
		Day_Presets = {
			[1]={
				img = "2a46m_main", -- name of reticle image
				imgscale = 1,
				zoom = 20, -- zoom (from 0 to 60)
				ox = 0, -- x offset (pixels)
				oy = 0, -- y offset (pixels)

				type = "analogue", -- digital or analogue

				nv = false,

				ir = true,
				irimg = "2a46m_main",
				irimgscale = 1,
				ircr = 1,
				ircg = 1,
				ircb = 1,
			},
			[2]={
				img = "2a46m_main",
				imgscale = 1,
				zoom = 55,
				ox = 0,
				oy = 0,

				type = "analogue",

				nv = false,

				ir = true,
				irimg = "2a46m_main",
				irimgscale = 1,
				ircr = 1,
				ircg = 1,
				ircb = 1,
			},
		},

		Shell_Presets = {
			["762x54"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 500,
				Reserve_Ammo = 2000,
			},
		},

	},

	["dshk"]={

		Name = "DSHK",
		Caliber = 12.7, -- mm
		Accuracy = 0.006, -- from 0 to 1
		Fire_Rate = 700, -- rounds/min
		Reload_Time = 10, -- s
		Weapon_Sound = "dshk_0",
		Reload_Sound = "mgreload",
		
		Day_Presets = {},

		Shell_Presets = {
			["127x108"]={
				Custom = false, -- If this is true, info about the ammo type will be given to the main script

				Mag_Size = 150,
				Reserve_Ammo = 750,
			},
		},

	},

}

Optics = {
	["PP1"]={
		Day_Presets = {
			[1]={
				Image = "PP1-2_main", -- name of reticle image
				Image_Scale = 0.8,
				FOV = 8, -- zoom (from 0 to 60)

				Type = "analogue", -- digital or analogue

				Modes = "Day"
			},
	
		},
	},
	
	["BM13"]={

		Modes = "Day",

		Day_Presets = {
			[1]={
				Image = "", -- name of reticle image
				Image_Scale = .4,
				FOV = 30, -- zoom (from 0 to 60)
				Tint_Color_R = 1,
				Tint_Color_G = 1,
				Tint_Color_B = .5,

				Type = "artillery", -- digital or analogue
			},
			[2]={
				Image = "", -- name of reticle image
				Image_Scale = .4,
				FOV = 30, -- zoom (from 0 to 60)
				Tint_Color_R = 1,
				Tint_Color_G = 1,
				Tint_Color_B = .5,

				Type = "analogue", -- digital or analogue\
			},
			[3]={
				Image = "", -- name of reticle image
				Image_Scale = .4,
				FOV = 15, -- zoom (from 0 to 60)
				Tint_Color_R = 1,
				Tint_Color_G = 1,
				Tint_Color_B = .5,

				Type = "analogue", -- digital or analogue\
			},
		},
	},
}

function init()
	local v = FindVehicle("TABS")

	VehicleInit(v,Vehicle,Weapons,Optics)

	SetTag(v, "TABSINIT")
end