[Thing Template=AAUSABuildingPackableHQ]
{
	IDS = usa1_hq_mechanized
	name = "#usa1_hq_mechanized_Thing_name"
	editor_name = "#usa1_hq_mechanized_Thing_editor_name"

	[BodyComponent]
	health = 10000
	defense = 5

	[DefenderComponent]
	{
		control_range = 20
	
		[Ability Template=AATurretAttackLocal]
		{
			turret_ids = Turret
			
			[AbilityDefinition Template=AAInfantryMG]
			{
				name = "#usa1_hq_mechanized_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				
			}
		}
	}

  	[DenizenComponent]
  	{
  		[DeploymentInfo]
  		{
  			creation_offset = 3.15, 0.0
  			deployment_offset = 3.15, 6.0
  		}
  	} 

	[DetectionComponent Template=HQDetectionComponent]

	[EconomyComponent]
	{		
		[Cost]	
		money = 3

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

		[Production]
		unit_limit_provided = 6
	}

	[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 = captain
		
		[Property]
		property_ids = mechhq
		
		[Property]
		property_ids = nation_usa

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

	[RecruitComponent]
	{

		[RecruitActor]
		actor_ids = regiment_usa_tank_recon42

		[RecruitActor]
		actor_ids = regiment_usa_combat_team42

		[RecruitActor]
		actor_ids = regiment_usa_halftrack_artillery

		[RecruitActor]
		actor_ids = regiment_usa_halftrack_at42


	}

	[Size]
	{
		blocking_shape = SQUARE
		square_size = 10
	}
	
	[SupplyComponent Template=HQSupplyComponent]
	
	[View]
	{	
		minimap_icon = /Minimap/Icons/IconDivisionHQ.tga
		resource_prefix = USAHQMechanized/USAHQMechanized
		icon = /UI/Game/BuildingButtons/IconHQMechanized.png
		
		[TextureSearchPath]
		path = /Units/USA/USAHalftrack
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = usa_waving_flag_pole
			location = building_flag
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_hq_vehicle_dirt
			terrain_group_filter = dirt
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_hq_vehicle_desert
			terrain_group_filter = desert
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = ground_hq_vehicle_snow
			terrain_group_filter = snow
		}
		
		;----- Lights -----
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = spotlight_01
			location = spotlight_ae_01
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = spotlight_02
			location = spotlight_ae_02
			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 = window_tiny
			location = window_05
			attached = true
		}
		
		[WhenConstructed Template=FXC_CreateVFX]
		{
			vfx_ids = window_tiny
			location = window_06
			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
		}
	}
}
