-- MODERN SEA MINE - by SUNTSAG --


mount_vfs_model_path	(current_mod_path.."/Shapes")
--mount_vfs_texture_path  (current_mod_path.."/Textures/K_Tom_001_LOD0")

	
GT = {};
GT_t.ws = 0;

set_recursive_metatable(GT, GT_t.generic_ship)

local IED = {
	category = CAT_SHELLS,
	user_name = _("IED"),
	model_name    = "pula",
	v0    = 1500.0,
	Dv0   = 0.00508,
	Da0     = 0.0005,
	Da1     = 0.0,
	mass      = 4000,
	explosive     = 10000,
	life_time     = 7,
	caliber     = 240.0,
	s         = 0.0,
	j         = 0.0,
	l         = 0.0,
	charTime    = 0,
	cx        = {1.0,0.78,0.60,0.15,1.80},
	k1        = 9.4e-09,
	tracer_off    = 4,
	scale_tracer  = 1,
	
	name = "IED",

	cartridge = 0,
	};
declare_weapon(IED);

GT_t.LN_t._IEDA = {} 
GT_t.LN_t._IEDA.type = 2
GT_t.LN_t._IEDA.xc = 0.585
GT_t.LN_t._IEDA.distanceMin = 1
GT_t.LN_t._IEDA.distanceMax = 30
GT_t.LN_t._IEDA.max_trg_alt = 150
GT_t.LN_t._IEDA.reactionTime = 1
GT_t.LN_t._IEDA.launch_delay = 1
GT_t.LN_t._IEDA.radialDisperse = 2.7;
GT_t.LN_t._IEDA.dispertionReductionFactor = 0.988;
GT_t.LN_t._IEDA.maxShootingSpeed = 30
GT_t.LN_t._IEDA.beamWidth = math.rad(1);
GT_t.LN_t._IEDA.inclination_correction_upper_limit = math.rad(20);
GT_t.LN_t._IEDA.inclination_correction_bias = math.rad(0.4);
GT_t.LN_t._IEDA.sensor = {}
set_recursive_metatable(GT_t.LN_t._IEDA.sensor, GT_t.WSN_t[4])
GT_t.LN_t._IEDA.PL = {}
GT_t.LN_t._IEDA.PL[1] = {}
GT_t.LN_t._IEDA.PL[1].shot_delay = 9
GT_t.LN_t._IEDA.PL[1].ammo_capacity = 12
GT_t.LN_t._IEDA.PL[1].reload_time = 600;
GT_t.LN_t._IEDA.PL[1].type_ammunition=IED.wsTypeOfWeapon
GT_t.LN_t._IEDA.PL[1].shell_name = {"IED"};
GT_t.LN_t._IEDA.PL[1].switch_on_delay = 0.5;
GT_t.LN_t._IEDA.BR = { {pos = {1.2, 0, 0} } }



GT.visual = {}
GT.visual.shape = "K_Tom_001"
GT.visual.shape_dstr = "K_Tom_001_dstr"


GT.life = 2;
GT.mass = 12
GT.max_velocity = 0.5
GT.race_velocity = 0.5
GT.economy_velocity = 0.5
GT.economy_distance = 1.1112e+007
GT.race_distance = 2.778e+006
GT.shipLength = 3.5
GT.Width = 3.5
GT.Height = 3.5
GT.Length = 3.5
GT.DeckLevel = 3.5
GT.X_nose = 0.1
GT.X_tail = -0.1
GT.Tail_Width = 3
GT.Gamma_max = 10.01
GT.Om = 10.01
GT.speedup = 0.229734
GT.R_min = 345.6
GT.distFindObstacles = 568.4

GT.riverCraft = true
GT.RCS  = 500

GT.DM = {
    { area_name = "NOSE_R",			area_arg = 70,	area_life = 110, area_fire = { pos = {50.0, 4.0, 5.0}, size = 0.8}},
    { area_name = "BORT_R",			area_arg = 71,	area_life = 110, area_fire = { pos = {0.0,  2.0, 8.0}, size = 0.8}},
    { area_name = "KORMA_R", 		area_arg = 72,	area_life = 110, area_fire = { pos = {-70.0, 2.0, 7.7}, size = 0.8}},
    { area_name = "NOSE_L", 		area_arg = 73,	area_life = 110, area_fire = { pos = {50.0, 4.0, -5.0}, size = 0.8}},
    { area_name = "BORT_L", 		area_arg = 74,	area_life = 110, area_fire = { pos = {0.0,  2.0, -8.0}, size = 0.8}},
    { area_name = "KORMA_L", 		area_arg = 75,	area_life = 110, area_fire = { pos = {-70.0, 2.0, -7.7}, size = 0.8}},
	{ area_name = "NOSE_TOP",		area_arg = 76,	area_life = 80,  area_fire = { pos = {41.5, 7.5, 0.0}, size = 0.5}},
    { area_name = "RUBKA_TOP",		area_arg = 77,	area_life = 100,},
	{ area_name = "HP",				area_arg = 78,	area_life = 80,  area_fire = { pos = {-44.0, 9.6, 0.0}, size = 0.5}},
	{ area_name = "KORMA_BACK", 	area_arg = 79,	area_life = 110, area_fire = { pos = {-85.7, 2.0, 0.0}, size = 0.5}},
	{ area_name = "KABINA",			area_arg = 80,	area_life = 220, area_fire = { pos = {29.0, 15.0, 0.0}, size = 1.5}},
	{ area_name = "BORT_TOP_Back", 	area_arg = 81,	area_life = 80,  area_fire = { pos = {-62.5, 7.0, 0.0}, size = 0.5}},
	{ area_name = "NADSTROYKA",		area_arg = 82,	area_life = 220, area_fire = { pos = {-23.0, 12.0, 0.0}, size = 1.5}},
	{ area_name = "SUPERSTRUCTURE_Mid",	area_arg = 83,	area_life = 320, area_fire = { pos = {6.0, 8.0, 0.0}, size = 1.5}},
	{ area_name = "KORMA_TOP", 		area_arg = 84,	area_life = 40, area_fire = { pos = {-80.5, 4.2, 0.0}, size = 1.0}},
    { area_name = "TOWER_NOSE",		area_arg = 97,	area_life = 60, area_fire = { pos = {53.0, 9.0, 0.0}, size = 0.5}},
	{ area_name = "TOWER_KORMA",	area_arg = 98,	area_life = 60, area_fire = { pos = {-73.5, 5.5, 0.0}, size = 0.5}},
    { area_name = "ZA_R",			area_arg = 99,	area_life = 27, area_fire = { pos = {3.7, 17.15, 6.25}, size = 0.5}},
    { area_name = "ZA_L",			area_arg = 100,	area_life = 27, area_fire = { pos = {3.7, 17.15, -6.25}, size = 0.5}},
}


GT.Name = "Tom1"
GT.DisplayName = _("Killa Tomato")
GT.Rate = 4000


GT.DetectionRange  = GT.airFindDist;
GT.ThreatRange = GT.airWeaponDist;
GT.Singleton   ="no";
GT.mapclasskey = "P0091000353";
GT.attribute = {wsType_Navy,wsType_Ship,wsType_CivilShip,wsType_GenericCivShip,
				"Unarmed ships",
				};
		
				
add_surface_unit(GT)

