PATH_SCIENCE
{
	author = Angel-125
	name = Watney
	title = Watney Chemistry Lab
	shortName = Chemistry Lab
	description = Want to make ResearchKits? Need to form water from Monopropellant and Oxidizer, or crack water into some O2 and liquid hydrogen? You can do all that in the DH-56 Watney Chemistry Lab. Be sure to burn off excess hydrogen, and make sure your airlock seals are tight..
	mass = 3
	requiredResource = Equipment
	requiredAmount = 1200
	reconfigureSkill = ConverterSkill
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Watney
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/WatneyGlow
	toolTip = The Watney Chemistry Lab gives you a place for all your chemistry experiments. In addition to making ResearchKits, the lab offers a way to produce water, liquid hydrogen, and oxygen
	toolTipTitle = Your First Chemistry Lab!
	templateTags = orbitalWorkshop;moleLab;dsevLab;airshipLab

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Create Research Kits
		StartActionName = Start Research Kits
		StopActionName = Stop Research Kits
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
		 
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.5
		}

		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 15
		}

		OUTPUT_RESOURCE
		{
			ResourceName = ResearchKits
			Ratio = 0.02
			DumpExcess = false
		}
	}

	//Ok so we don't really know what MonoPropellant is
	//perhaps it's hydrazine. Ditto for Oxidizer.
	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Watney Rainmaker
		StartActionName = Start Create Water
		StopActionName = Stop Create Water
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
		 
		INPUT_RESOURCE
		{
			ResourceName = MonoPropellant
			Ratio = .5
		}

		INPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = .5
		}

		OUTPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
			DumpExcess = true
		}

		OUTPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 1.0
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Fuel Cell
		StartActionName = Start Fuel Cell
		StopActionName = Stop Fuel Cell
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
		 
		INPUT_RESOURCE
		{
			ResourceName = LiquidFuel
			Ratio = 0.0405
		}

		INPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = 0.0494
		}

		OUTPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 36
			DumpExcess = false
		}

		OUTPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 0.45
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Auxiliary Generator
		StartActionName = Start Generator
		StopActionName = Stop Generator
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
		 
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.01
			FlowMode = STAGE_PRIORITY_FLOW
		}

		OUTPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 18
			DumpExcess = false
		}
	}

	MODULE
	{
		name = WBIPowerMonitor
	}

	//Mole = 6 x 10^23
	//mass of 1 mole of hydrogen gas = 2g
	//mass of 1 mole of O2 = 32g
	//mass of 1 mole of water = 18g
	//1 mole of hydrogen = 1g
	//1 mole of oxygen = 16g
	//1kg of water (1L of water) produces 111.19g of hydrogen and 888.81g of oxygen (4.0032kg hydrogen, 31.998kg of oxygen)
	//For standard atmosphere and pressure, 1 mole takes up 22.4L

	//888.81g * 1 mole / 16g = 55.11 mole of oxygen
	//O2 Liters: 888.81g * 1 mole / 32g = 27.78L of O2
	//1L of LH2 masses 0.07085kg (70.85g)
	//1L of water produces 55.595g of H2 gas
	//1L of water produces 0.7847L of LH2

	//1 unit (1u) = 1L
	//1u of water produces 27.78u of Oxygen and 0.7847u of LqdHydrogen

	//About 200J/g to split water.
	//200 J/g * 111.19g of hydrogen = 22,238J
	//Assume 1u EC = 1kw
	//EC input: about 22

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Watney Water Splitter
		StartActionName = Start Electrolysis
		StopActionName = Stop Electrolysis
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
		 
		INPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 1
		}

		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 22
		}

		OUTPUT_RESOURCE
		{
			ResourceName = Oxygen
			Ratio = 27.78
			DumpExcess = true
		}

		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 0.78455
			DumpExcess = true
		}
	
		OUTPUT_RESOURCE
		{
			ResourceName = LqdDeuterium
			Ratio = 0.00015
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Water Splitter (LH2+Ox)
		StartActionName = Start Electrolysis
		StopActionName = Stop Electrolysis
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		SpecialistBonusBase = 0.05
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
			 
		INPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 1
		}

		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 22
		}

		OUTPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = 27.78
			DumpExcess = true
		}

		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 0.78455
			DumpExcess = true
		}
	
		OUTPUT_RESOURCE
		{
			ResourceName = LqdDeuterium
			Ratio = 0.00015
			DumpExcess = true
		}
	}

	MODULE
	{
		name = WBIEfficiencyMonitor
		efficiencyType = science
		harvestType = 0
	}

	RESOURCE
	{
		name = ElectricCharge
		amount = 200
		maxAmount = 200
		isTweakable = true
	}

	RESOURCE
	{
		name = Oxygen
		amount = 450
		maxAmount = 450
		isTweakable = true
	}

	RESOURCE
	{
		name = Oxidizer
		amount = 400
		maxAmount = 400
		isTweakable = true
	}

	RESOURCE
	{
		name = LiquidFuel
		amount = 450
		maxAmount = 450
		isTweakable = true
	}

	RESOURCE
	{
		name = MonoPropellant
		amount = 400
		maxAmount = 400
		isTweakable = true
	}

	RESOURCE
	{
		name = Water
		amount = 400
		maxAmount = 400
		isTweakable = true
	}

	RESOURCE
	{
		name = LqdHydrogen
		amount = 450
		maxAmount = 450
		isTweakable = true
	}

	RESOURCE
	{
		name = ResearchKits
		amount = 400
		maxAmount = 400
		isTweakable = true
	}

}