<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude">
	<Tags></Tags>
	<Includes>
    <Include
			type="all"
			source="DATA:GlobalData/GlobalDefines.xml" />
    <Include
			type="all"
			source="ART:GBAirSupprt.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprt_A.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprt_ABLD.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprt_ANM.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprtD2_SKN.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprtD2_ANM.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprtD3_SKN.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprtD3_ANM.w3x" />

		<Include
			type="all"
			source="ART:GBAirRadar.w3x" />
		<Include
			type="all"
			source="ART:GBAirRadarD.w3x" />
    <Include
			type="all"
			source="ART:FXInvisBone.w3x" />
		<Include
			type="all"
			source="ART:GBAirSupprtSRF_SKN.w3x" />
    <!-- Base Object -->
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseStructure.xml" />
	</Includes>
	<GameObject
		id="GDIAirSupport"
		inheritFrom="BaseStructure"
		SelectPortrait="Portrait_AirSupport"
		ButtonImage="Portrait_AirSupport"
		Side="GDI"
		EditorSorting="STRUCTURE"
		TransportSlotCount="1"
		BuildCost="500"
		BuildTime="5"
		EnergyProduction="-5"
		CommandSet="GDIAirSupportCommandSet"
		KindOf="STRUCTURE SELECTABLE IMMOBILE CAN_CAST_REFLECTIONS AIRFIELD NOT_AUTOACQUIRABLE AUTO_ACQUIRABLE_BY_AI COVER POWERED_POWERS_ONLY"
		RadarPriority="STRUCTURE"
		PlacementViewAngle="225d"
		ProductionQueueType="OTHER_STRUCTURE"
		BuildPlacementTypeFlag="OTHER_STRUCTURE"
		EditorName="GDIAirSupport"
		Description="Desc:GDIAirSupport"
		TypeDescription="Type:GDIAirSupport">
		<DisplayName
			xai:joinAction="Replace" xmlns:xai="uri:ea.com:eala:asset:instance">Name:GDIAirSupport</DisplayName>
		<ArmorSet
			Armor="GDIAirTowerArmor"
			DamageFX="FactionStructureDamageFX" />
		<GameDependency>
			<RequiredObject>GDIAirTower</RequiredObject>
		</GameDependency>
		<SkirmishAIInformation
			BaseBuildingLocation="BACK" />
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true"
				ExtraPublicBone="Runway0Park0Han Runway0Park1Han Runway1Park0Han Runway1Park1Han">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="GBAirSupprt" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="GBAirSupprt_ABLD" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="GBAirSupprt" />
					<ParticleSysBone
						BoneName="ROOTTRANSFORM"
						FXParticleSystemTemplate="GDIPPDamagedSmoke"
						FollowBone="true" />
					<Texture
						Original="GBAirSupprt"
						New="GBAirSupprtD" />						
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="GBAirSupprtD2_SKN" />
					<ParticleSysBone
						BoneName="ROOTTRANSFORM"
						FXParticleSystemTemplate="GDIPPDamagedSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="ROOTTRANSFORM"
						FXParticleSystemTemplate="GDIPPDamagedFire"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="ROOTTRANSFORM"
						FXParticleSystemTemplate="GDIPPDamagedSmoke"
						FollowBone="true" />
					<ParticleSysBone
						BoneName="ROOTTRANSFORM"
						FXParticleSystemTemplate="GDIRefineryDamagedDist"
						FollowBone="true" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="GBAirSupprtD3_SKN" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT">
					<Animation
						AnimationName="GBAirSupprt_ANM"
						AnimationMode="LOOP" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="GBAirSupprt_ABLD"
						AnimationMode="ONCE" />
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Con_Small"
						FollowBone="true" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="RUBBLE"
					StateName="STATE_Rubble"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="GBAirSupprtD3_ANM"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_Rubble" and Prev ~= "TRANS_IntoRubble" then
						CurDrawableSetTransitionAnimState("TRANS_IntoRubble")
						end
					</Script>
					<ParticleSysBone
						BoneName="NONE"
						FXParticleSystemTemplate="Des_Medium"
						FollowBone="false" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED"
					StateName="STATE_ReallyDamaged"
					Flags="START_FRAME_LAST">
					<Animation
						AnimationName="GBAirSupprtD2_ANM"
						AnimationMode="MANUAL" />
					<Script>
						Prev = CurDrawablePrevAnimationState();
						if Prev ~= "STATE_ReallyDamaged" and Prev ~= "TRANS_IntoReallyDamaged" then
						CurDrawableSetTransitionAnimState("TRANS_IntoReallyDamaged")
						end
					</Script>
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoReallyDamaged">
					<Animation
						AnimationName="GBAirSupprtD2_ANM"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_TRANSITION"
					StateName="TRANS_IntoRubble">
					<Animation
						AnimationName="GBAirSupprtD3_ANM"
						AnimationMode="ONCE"
						AnimationBlendTime="0" />
				</AnimationState>
			</ScriptedModelDraw>
			<!-- DRAW RADAR
			<ScriptedModelDraw
				id="ModuleTag_Draw_RADAR"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="GBAirRadar" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Model
						Name="GBAirDoor_A" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED">
					<Model
						Name="GBAirRadarD" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED">
					<Model
						Name="GBAirRadarD" />
				</ModelConditionState>
				<ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING">
					<Model
						Name="" />
				</ModelConditionState>
				<AnimationState
					ParseCondStateType="PARSE_DEFAULT"
					Flags="DO_NOT_PLAY_WHEN_UNPOWERED">
					<Animation
						AnimationName="GBAirRadar"
						AnimationMode="LOOP" />
				</AnimationState>
				
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="STRUCTURE_UNPACKING">
					<Animation
						AnimationName="GBAirDoor_A"
						AnimationMode="ONCE" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DAMAGED"
					Flags="DO_NOT_PLAY_WHEN_UNPOWERED">
					<Animation
						AnimationName="GBAirRadarD"
						AnimationMode="LOOP" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="REALLYDAMAGED"
					Flags="DO_NOT_PLAY_WHEN_UNPOWERED">
					<Animation
						AnimationName="GBAirRadarD"
						AnimationMode="LOOP" />
				</AnimationState>
				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="DYING"
					Flags="DO_NOT_PLAY_WHEN_UNPOWERED">
					<Animation
						AnimationName="GBAirRadarD"
						AnimationMode="LOOP" />
				</AnimationState>
			</ScriptedModelDraw>
		 -->
		 
      <ScriptedModelDraw
        id="ModuleTag_RepairDecal"
        OkToChangeModelColor="true">
        <ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
          <Model Name="" />
        </ModelConditionState>
        <ModelConditionState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="SELECTED">
          <Model Name="FXInvisBone" />
          <ShadowInfo
						Type="ADDITIVE_DECAL"
						SizeX="=$REPAIR_DRONE_HOME_DECAL_SIZE"
						SizeY="=$REPAIR_DRONE_HOME_DECAL_SIZE"
						OverrideLODVisibility="true"
						MaxHeight="200"
						UseHouseColor="true"
						LocalPlayerOnly="true"
						Texture="Decal_Rig_CO" 
					/>
        </ModelConditionState>
      </ScriptedModelDraw>
			

    </Draws>
		<Behaviors>

			<BuildingBehavior
				id="ModuleTag_BuildingBehavior"
				NightWindowObject="LIGHT_01" />
		
		<!--	<ProductionUpdate
				id="ProductionUpdateModuleTag"
				GiveNoXP="true"
				Type="AIRCRAFT" />	-->
			<RecallUnitsSpecialPower
				id="ModuleTag_RecallSpecialPower"
				PlayReturnVoiceFromRecalledUnit="true"
				SpecialPowerTemplate="SpecialPower_RecallAllAircraft" />
			<SpawnBehavior
				id="ModuleTag_SpawnRepairDrones"
				SpawnNumberData="2"
				InitialBurst="1"
				SpawnReplaceDelayData="10s"
				SpawnedRequireSpawner="true"
				KillSpawnsOnCaptured="true"
				SpawnInsideBuilding="true"
				KillSpawnsOnDisabled="true">
				<Die
					DeathTypes="ALL" />
				<SpawnTemplate>GDIRepairAircraftDrone</SpawnTemplate>
			</SpawnBehavior>
			<ParkingPlaceBehavior
				id="ModuleTag_ParkingPlaceBehavior"
				HealAmount="0"
				NumRows="2"
				NumCols="2"
				ApproachHeight="130"
				ParkInHangars="true"
				DoorOpenTime="2s"
				DoorCloseTime="2s">				
				<CanParkHereFilter
					Rule="ALL"
					Relationship="SAME_PLAYER"
					Exclude="SUMMONED TRANSPORT" />
			</ParkingPlaceBehavior>
			<SlowDeath
				id="ModuleTag_Death"
				SinkDelay="1.8s"
				SinkRate="4.0"
				DestructionDelay="8.0s">
				<Sound Type="INITIAL" List="HumanFaction_MediumBuilding_DieMS" />
				<DieMuxData
					DeathTypes="ALL" />
			</SlowDeath>
			<FXListBehavior
				id="ModuleTag_FXList">
				<DieMuxData
					DeathTypes="ALL" />
				<Event
					Index="onTransitionToDamaged"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToReallyDamaged"
					FX="FX_BuildDamaged_Small" />
				<Event
					Index="onTransitionToRubble"
					FX="FX_BuildRubble_Small" />
			</FXListBehavior>
			<StructureUnpackUpdate
				UnpackTime="3s" />
				
			<xi:include
				href="../../Includes/GenericBuildingRepair.xml" />
			<xi:include
				href="../../Includes/GenericEngineerContain.xml" />
	<!--		<xi:include
				href="../../Includes/GenericGDIBuildingDestruction.xml" />
			<xi:include
				href="../../Includes/GenericGDIBuildingSuicide.xml" />
	-->
		</Behaviors>
		<AI>
			<!-- needed for special powers -->
			<AIUpdate
				id="ModuleTag_AIUpdate"
				AutoAcquireEnemiesWhenIdle="NO" />
		</AI>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="2000.0" />
		</Body>
		<ClientBehaviors>
			<AnimationSoundClientBehavior id="ModuleTag_ASCB">
				<Sound Sound="GDI_AirField_doorOpen" Animation="GBAirDoor_OPN" Frame="1" />
				<Sound Sound="GDI_AirField_doorClose" Animation="GBAirDoor_CLS" Frame="1" />
			</AnimationSoundClientBehavior>
		</ClientBehaviors>

		<Geometry
			IsSmall="false">
			<Shape
				Type="BOX"
				Name="Geom_Orig"
				MajorRadius="50.0"
				MinorRadius="75.0"
				Height="30.0"></Shape>
			<Shape
				Type="CYLINDER"
				Name="Geom_Tower"
				MajorRadius="12.0"
				MinorRadius="12.0"
				Height="75.0">
				<Offset
					x="30.0"
					y="-54.0"
					z="0.0" />
			</Shape>
			<Shape 
				Type= "BOX"
				MajorRadius = "60.0"
				MinorRadius = "80.0"
				Height = "3.0" >
				<Offset
					x = "0.0"
					y = "0.0"
					z = "0.0" />
			</Shape>			
			<ContactPoint>
				<Pos
					x="-55.0"
					y="78.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="55.0"
					y="78.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="55.0"
					y="-78.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="55.0"
					y="78.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-55.0"
					y="-78.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="55.0"
					y="78.0"
					z="0" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-55.0"
					y="-78.0"
					z="30" />
			</ContactPoint>
			<ContactPoint>
				<Pos
					x="-55.0"
					y="78.0"
					z="0" />
			</ContactPoint>
		</Geometry>
		<AudioArrayVoice>
			<AudioEntry
				Sound="GDI_CombatSupportAirfield_Select"
				AudioType="voiceSelect" />
		</AudioArrayVoice>
		<AudioArraySound>
			<AudioEntry Sound="HumanFaction_MediumBuilding_LightDamageMS" AudioType="soundOnDamaged" />
			<AudioEntry Sound="HumanFaction_MediumBuilding_HeavyDamageMS" AudioType="soundOnReallyDamaged" />
		</AudioArraySound>
		<AudioArraySound>
			<AudioEntry Sound="Amb_FireRubble" AudioType="soundAmbientReallyDamaged" />
		</AudioArraySound>
		<ShadowInfo
			Type="VOLUME" />
		<VisionInfo
			VisionRange="100"
			ShroudClearingRange="150" />
		<ProjectedBuildabilityInfo
			Radius="0.0"
			BuildPlacementTypes="MAIN_STRUCTURE OTHER_STRUCTURE" />
	</GameObject>
</AssetDeclaration>
