[Thing Template=AAUSABuildingPackableHQ]
{
	IDS = usa_hq_marine
	name = "#usa_hq_marine_Thing_name"
	editor_name = "#usa_hq_marine_Thing_editor_name"

	[BodyComponent]
	health = 12000
	defense = 5
	
	[DenizenComponent]
	{
		[DeploymentInfo]
		{
			creation_offset = 2.5, 1.5.0
			deployment_offset = 2.5, 6.0
		}
	}

	[DefenderComponent]
	{
		control_range = 20
	
		[Ability Template=AATurretAttackLocal]
		{
			turret_ids = Turret
			
			[AbilityDefinition Template=AAInfantryMG]
			{
				name = "#usa_hq_marine_DefenderComponent_AbilityDefinition_name"
				area = 2
				attenuation_range_min = 0.5
				attenuation_factor_max = 0.5
				max_targets = 4
				
				recharge_time = 2
				range = 16
				
				[Effect Template=PierceDamageEffect]
				amount = 80
				
				[WhenDo template=FXC_PlaySFX]	
				audio_ids = usa_mg_heavy
				
				[Flags]
				spell = true				
			}
		}
	}

	[DetectionComponent Template=HQDetectionComponent]
	
	[EconomyComponent]
	{		
		[Cost]	
		money = 2

		[Upkeep]
		ammo = 2
		oil = 2
		money = 1

		[Production]

		unit_limit_provided = 9
	}

	[PerformerComponent]
	{
		[Turret]
		{
			turret_ids = Turret
			yaw_rotation_per_sec_degrees = 60
			yaw_rotation_range_degrees = 360
			yaw_start_degrees = 0
			;offset = -3.801, 3.472
		}
	}

	[Placement]
	placement_group_ids = null

	[PropertiesComponent]
	{		
		[Property]
		property_ids = nation_usa		

		[Property]
		property_ids = economic_building
		
		[Property]
		property_ids = mg	

		[Property]
		property_ids = mechhqproduction
		
		[Property]
		property_ids = armorhqproduction

		[Property]
		property_ids = captain
	
	}

	[RecruitComponent]
	{

		[RecruitActor]
		actor_ids = regiment_usa_engineer

		[RecruitActor]
		actor_ids = regiment_usa_marine_assault

		[RecruitActor]
		actor_ids = regiment_usa_tank_reconm

		[RecruitActor]
		actor_ids = usa_truck_105mmartillery

		[RecruitActor]
		actor_ids = usa_truck_57mmartillery

		[RecruitActor]
		actor_ids = usa_truck_50calartillery

		[RecruitActor]
		actor_ids = regiment_usa_tank_marine

		[RecruitActor]
		actor_ids = regiment_usa_marine_artillery

		[RecruitActor]
		actor_ids = regiment_usa_halftrack_aa

		[RecruitActor]
		actor_ids = usa_truck_supply

	}

	[ResearchComponent]

	[Size]
	{
		blocking_shape = SQUARE
		square_size = 10
	}
	
	[SupplyComponent Template=HQSupplyComponent]

	[View]
	{
		minimap_icon = /Minimap/Icons/IconDivisionHQ.tga
		resource_prefix = USAHQInfantry/USAHQInfantry
		icon = /UI/Game/BuildingButtons/IconHQInfantry.png
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = usa_waving_flag_pole
			location = building_flag
		}

		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_hq_infantry_dirt
			terrain_group_filter = dirt
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_hq_infantry_desert
			terrain_group_filter = desert
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_hq_infantry_snow
			terrain_group_filter = snow
		}

		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = spotlight_01
			location = spotlight_ae_01
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = window_tiny
			location = window_01
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = window_tiny
			location = window_02
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = window_tiny
			location = window_03
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = window_tiny
			location = window_04
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = door_narrow
			location = door_01
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = door_large
			location = door_02
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = door_narrow
			location = door_04
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = door_narrow
			location = door_03
			attached = true
		}
	}
}
