//SSI-WrightEngine - SSI Aerospace: Purchase a Wright engine.

CONTRACT_TYPE
{


//REQUIREMENTS FOR CONTRACT TO APPEAR

	REQUIREMENT
	{
		name = CompleteContract
		type = CompleteContract
		
		contractType = SSI-Start
		minCount = 1
		
	}

	REQUIREMENT
	{
		name = Funds
		type = Funds
		
		minFunds = @/membershipBalance
		
	}
	
	REQUIREMENT
	{
		name = Any
		type = Any
	
		REQUIREMENT
		{
			name = PartUnlocked
			type = PartUnlocked
			
			part = miniFuelTank
			part = fuelLine
			
			invertRequirement = true

		}
		
		REQUIREMENT:NEEDS[KAX]
		{
			name = PartUnlocked
			type = PartUnlocked
			
			part = KAXkueyTailRotor
			
			invertRequirement = true

		}
	
	}


//DATA NODES TO PROCESS FOR CONTRACT USE

	DATA
	{
		name = double
		type = double
		
		membershipBalance = Round(StartingFunds() * 0.25)
		productionCost = 0 - @membershipBalance
		
	}

//CONTRACT DESCRIPTION

	name = SSI-WrightEngine
	title = Purchase a Wright engine.
	group = SSI Aerospace-Economy
	agent = SSI Aerospace
	
	description = Hello, my name is Orville Kerman, and I and my brother founded Wright Aeronautical. We started out with a bicycle company but have only recently begun exploring the area of aerodynamics. We have recently developed an engine that is light enough to mount onto a flying machine!\n\nAs a member of SSI, you may purchase the following production-ready prototype parts that will allow you to start making flying machines:\n\n- Oscar-B Fuel Tank\n- FTX-2 External Fuel Duct\n- NS90 Tail Rotor (Requires KAX)
	
	synopsis = Flight engine technology is at your fingertips! Simply cover the cost of our initial production run, and these prototype parts will be yours! 
	
	notes = These parts will be available immediately to your organization upon contract acceptance.
	
	completedMessage = Part transfer complete.\n\nYour organization now has access to the following:\n\n- Oscar-B Fuel Tank\n- FTX-2 External Fuel Duct\n- NS90 Tail Rotor\n\nEnjoy the new parts!
	
//Contract Limits
   	maxCompletions = 1
   	maxSimultaneous = 1
	weight = 40.0

	autoAccept = false
	declinable = true
	cancellable = true

	minExpiry = 7.0
	maxExpiry = 7.0
	deadline = 0

//Contract Reward Modifiers
	prestige = Trivial
   	targetBody = Kerbin

//Contract Rewards
  	advanceFunds = 0.0
	rewardFunds = @/productionCost
	rewardReputation = 0.0
 	rewardScience = 0.0
	
//Contract Penalties
  	failureFunds = 0.0
 	failureReputation = 0.0


//BEHAVIOURS TO DO WHEN CREATING CONTRACT

	BEHAVIOUR
	{
		name = ExperimentalPart
		type = ExperimentalPart

		part = miniFuelTank	
		part = fuelLine
		part = KAXkueyTailRotor
		
		unlockCriteria = CONTRACT_ACCEPTANCE
		lockCriteria = DO_NOT_LOCK

	}
	

//PARAMETERS FOR CONTRACT COMPLETION

	PARAMETER
	{
		name = Timer
		type = Timer
		
		duration = 1s
		
		timerType = CONTRACT_ACCEPTANCE	
		
		failContract = false
	
	}
	
}