dofile("Scripts/Database/wsTypes.lua")

local GALLON_TO_KG = 3.785 * 0.8
local INCHES_TO_M = 0.0254
local POUNDS_TO_KG = 0.453592

local tracer_on_time = 0.01
local barrel_smoke_level = 1.0
local barrel_smoke_opacity = 0.1

--Hellfire Loadouts
declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M272_AGM-114K}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "M272 - 2x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((96 * POUNDS_TO_KG) + (2*45.4)), 
	Weight_Empty		= 96 * POUNDS_TO_KG,
	Count				= 2,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M272",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Right
		}, 
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M299_AGM-114K_4}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "M299 - 4x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((145 * POUNDS_TO_KG) + (45.4*4)), 
	Weight_Empty		= 145 * POUNDS_TO_KG,
	Count				= 4,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M299",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Top Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point002", --Bottom Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Top Right
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point004", --Bottom Right
		}, 		
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M299_AGM-114K_2}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "M299 - 2x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((145 * POUNDS_TO_KG) + (45.4*2)), 
	Weight_Empty		= 145 * POUNDS_TO_KG,
	Count				= 2,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M299",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Top Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Top Right
		}, 		
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M299_AGM-114K_3STBD}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "M299 - 3x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((145 * POUNDS_TO_KG) + (45.4*3)), 
	Weight_Empty		= 145 * POUNDS_TO_KG,
	Count				= 3,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M299",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Top Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point002", --Bottom Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Top Right
		},  		
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M299_AGM-114K_3PORT}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "M299 - 3x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((145 * POUNDS_TO_KG) + (45.4*3)), 
	Weight_Empty		= 145 * POUNDS_TO_KG,
	Count				= 3,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M299",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Top Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Top Right
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point004", --Bottom Right
		}, 		
	},
})
--SH-60R Hellfire Loadouts
declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M272_AGM-114K_SEAHAWK}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "SEAHAWK: M272 - 2x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((96 * POUNDS_TO_KG) + (2*45.4)), 
	Weight_Empty		= 96 * POUNDS_TO_KG,
	Count				= 2,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M272",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Right
		}, 
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M299_AGM-114K_4_SEAHAWK}",
	Picture				= "agm114.png",
	Cx_pil				= 0.001,
	displayName			= "SEAHAWK: M299 - 4x AGM-114K, Laser Guided Missile (Code Changeable)",
	Weight				= ((145 * POUNDS_TO_KG) + (45.4*4)), 
	Weight_Empty		= 145 * POUNDS_TO_KG,
	Count				= 4,
	kind_of_shipping	= 0,
	attribute			= {4, 4, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGM_114K",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M299",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Top Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point002", --Bottom Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Top Right
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point004", --Bottom Right
		}, 		
	},
})
------------------------------------------------------------------------------------------------------
--DAGR Loadouts

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M272_DAGR_APKWS_STBD}",
	Picture				= "agm114KLmix.png",
	Cx_pil				= 0.001,
	displayName			= "M272 - 1x AGM-114K, 4x M282 APKWS",
	Weight				= ((96 * POUNDS_TO_KG) + 45.4 + ((13 + (32*4)) * POUNDS_TO_KG)), 
	Weight_Empty		= ((96 + 13) * POUNDS_TO_KG),
	Count				= 5,
	kind_of_shipping	= 0,
	attribute			= {4, 7, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M272",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point001", --Left
		}, 
		{
			payload_CLSID	=	"{DAGR_4_APKWS}",
			connector_name = "Point003", --Right
		}, 
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M272_DAGR_APKWS_PORT}",
	Picture				= "agm114KLmix.png",
	Cx_pil				= 0.001,
	displayName			= "M272 - 1x114, 4x M282 APKWS",
	Weight				= ((96 * POUNDS_TO_KG) + 45.4 + ((13 + (32*4)) * POUNDS_TO_KG)), 
	Weight_Empty		= ((96 + 13) * POUNDS_TO_KG),
	Count				= 5,
	kind_of_shipping	= 0,
	attribute			= {4, 7, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M272",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{DAGR_4_APKWS}",
			connector_name = "Point001", --Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point003", --Right
		}, 
	},
})

declare_loadout({
	category 			= CAT_MISSILES,
	CLSID	 			= "{ANDR0ID_M299_DAGR}",
	Picture				= "agm114KLmix.png",
	Cx_pil				= 0.001,
	displayName			= "M299 - 2x AGM-114K, 8x M282 APKWS",
	Weight				= ((145 * POUNDS_TO_KG) + 45.4*2 + (((13*2) + (32*8)) * POUNDS_TO_KG)), 
	Weight_Empty		= (145+((13*2))) * POUNDS_TO_KG,
	Count				= 10,
	kind_of_shipping	= 0,
	attribute			= {4, 7, 32, WSTYPE_PLACEHOLDER},
	wsTypeOfWeapon		= "weapons.missiles.AGR_20_M282",
	settings			= Get_LGU_GUISettings_Preset("WGU59"),
	Elements		=
	{
		{
			ShapeName	=	"M299",
			IsAdapter   =   true,
		},
		{
			payload_CLSID	=	"{DAGR_4_APKWS}",
			connector_name = "Point001", --Top Left
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point002", --Bottom Left
		}, 
		{
			payload_CLSID	=	"{DAGR_4_APKWS}",
			connector_name = "Point003", --Top Right
		}, 
		{
			payload_CLSID	=	"{ee368869-c35a-486a-afe7-284beb7c5d52}",
			connector_name = "Point004", --Bottom Right
		}, 		
	},
})
