@PART[mmgh-agr-*]:NEEDS[TacLifeSupport]
{
	MODULE
	{
		name = TacGenericConverter
		ConverterName = #LOC_mmgh_greenhouse
		StartActionName = #LOC_mmgh_greenhouseStart
		StopActionName = #LOC_mmgh_greenhouseStop
		tag = MMGH
		GeneratesHeat = false
		conversionRate = #$/refPower$
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.5
		SpecialistBonusBase = 1
		ExperienceEffect = ConverterSkill
		EfficiencyBonus = 1
		INPUT_RESOURCE
		{
			ResourceName = CarbonDioxide
			Ratio = 0.00148012889876
		}
		INPUT_RESOURCE
		{
			ResourceName = WasteWater
			Ratio = 0.000014247685185
		}
		INPUT_RESOURCE
		{
			ResourceName = Waste
			Ratio = 0.000001539351852
		}
		INPUT_RESOURCE
		{
			ResourceName = Minerals
			Ratio = 0.0000000035237055479406 // 0.0000033854166666
		}
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 6.0
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Oxygen
			Ratio = 0.001713537562385
			DumpExcess = false
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 0.0000100692708336
			DumpExcess = false
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Food
			Ratio = 0.000016927083333
			DumpExcess = false
		}
	}
	RESOURCE
	{
		name = Food
		amount = 1.097
		maxAmount = 1.097
		@amount *= #$/refPower$
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = Water
		amount = 0.725
		maxAmount = 0.725
		@amount *= #$/refPower$
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = Oxygen
		amount = 111.038
		maxAmount = 111.038
		@amount *= #$/refPower$
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = CarbonDioxide
		amount = 0
		maxAmount = 95.913
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = Waste
		amount = 0
		maxAmount = 0.1
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = WasteWater
		amount = 0
		maxAmount = 0.924
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = ElectricCharge // only load this into greenhouses or command
		amount = 150
		maxAmount = 150
		@amount *= #$/refPower$
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
	RESOURCE
	{
		name = Minerals
		amount = 50
		maxAmount = 50
		@amount *= #$/refPower$
		@maxAmount *= #$/refPower$
		Tag = MMGH
	}
}


// Use CarbonDioxide and Water as inputs
@PART[mmgh-alg-*]:NEEDS[TacLifeSupport]
{
	@MODULE[ModuleResourceConverter]:HAS[#Tag[MMGH-AL]]
	{
		@INPUT_RESOURCE,0
		{
			@ResourceName = Water
			@Ratio = 0.7208
			@Ratio *= #$/refPower$
		}
	}
	@MODULE[ModuleResourceConverter]:HAS[#Tag[MMGH-ALWS]]
	{
		@INPUT_RESOURCE,0
		{
			@ResourceName = Water
			@Ratio = 0.7208
			@Ratio *= #$/refPower$
		}
		
		@OUTPUT_RESOURCE:HAS[#ResourceName[Oxidizer]]
		{
			@ResourceName = Oxygen
			@Ratio = 453.900709
			@Ratio *= #$/refPower$
		}
		@OUTPUT_RESOURCE:HAS[#ResourceName[LqdOxygen]] // In case of RealFuels patch
		{
			@ResourceName = Oxygen
			@Ratio = 453.900709
			@Ratio *= #$/refPower$
		}
	}
}

@PART[mmgh-pbr-*]:NEEDS[TacLifeSupport]
{
	@MODULE[ModuleResourceConverter]:HAS[#Tag[MMGH-PCLF]]
	{
		@INPUT_RESOURCE,1
		{
			@ResourceName = CarbonDioxide
			@Ratio = 541.3839 // 24 mol
			@Ratio *= #$/refPower$
		}
		INPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 0.4685 // 26 mol
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
	@MODULE[ModuleResourceConverter]:HAS[#Tag[MMGH-PCCH4]]
	{
		@INPUT_RESOURCE,1
		{
			@ResourceName = CarbonDioxide
			@Ratio = 451.4533 // 20 mol
			@Ratio *= #$/refPower$
		}
		INPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 0.7208 // 40 mol
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
	@MODULE[ModuleResourceConverter]:HAS[#Tag[MMGH-PCETH]]
	{
		@INPUT_RESOURCE,1
		{
			@ResourceName = CarbonDioxide
			Ratio = 541.3839 // 24 mol
			@Ratio *= #$/refPower$
		}
		INPUT_RESOURCE
		{
			ResourceName = Water
			Ratio = 0.6487 // 36 mol
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
}