PROC:
	RenderSprites:
		Image: ref-bot
	Building:
		Footprint: =+x +=+ x==
		Dimensions: 3,3
		LocalCenterOffset: 0,-512,0
	Refinery:
		DockAngle: 192
		DockOffset: 1,1
	FreeActor:
		Actor: HARV
		SpawnOffset: 1,1
		Facing: 192
	Selectable:
		Bounds: 72,45,0,-4
		DecorationBounds: 72,75,1,-4
	-WithIdleOverlay@TOP:
	WithIdleOverlay@topsolid:
		Sequence: topsolid
		RequiresCondition: !cloak
	ExternalCondition@cloak:
		Condition: cloak
	WithIdleOverlay@cloak:
		Sequence: topsolid
		Palette: cloak
		IsPlayerPalette: true
    -HitShape:
    -HitShape@BOTTOMLEFT:
    -HitShape@TOP:

	HitShape@TOPLEFT:
		TargetableOffsets: 0,-1052,0 
		Type: Rectangle
			TopLeft: -1536, -256
			BottomRight: -256,256

	HitShape@TOPRIGHT:
		TargetableOffsets: 1050,1152,0  ,   620,830,0
		Type: Rectangle
			TopLeft: 256, -1024
			BottomRight: 1536, 256

	HitShape@BOTRIGHT:
		TargetableOffsets: -1600,1052,0 
		Type: Rectangle
			TopLeft: 256, 718
			BottomRight: 1536, 1280

	HitShape@BOTLEFT:
		TargetableOffsets: -1600,-1252,0  ,  -1700,-730,0
		Type: Rectangle
			TopLeft: -1536, 768
			BottomRight: -256, 2048
            
	
^Palettes:
    PaletteFromPaletteWithAlpha@cloak:
        Name: cloak
        BasePalette: player
        Alpha: 0.45

^Infantry:
	Inherits@PROC: ^AffectsPROC2
E7:
	Inherits@PROC: ^AffectsPROC
E6:
	Inherits@PROC: ^AffectsPROC
SPY:
	Inherits@PROC: ^AffectsPROC
THF:
	Inherits@PROC: ^AffectsPROC

^AffectsPROC:
	ProximityExternalCondition@cloak:
		Condition: cloak
		ValidStances: enemy, neutral, ally
		Range: 0c552
		RequiresCondition: !moving
	GrantConditionOnMovement@proc:
		Condition: moving

^AffectsPROC2:
	GrantConditionOnAttack@proc:
		Condition: attack
		ArmamentNames: primary, secondary, garrisoned
		RevokeDelay: 50
	ProximityExternalCondition@cloak:
		Condition: cloak
		ValidStances: enemy, neutral, ally
		Range: 0c412
		RequiresCondition: attack



