@PART[mmgh-alg-*]:FOR[MoldaviteMachines]
{
	RESOURCE
	{
		name = Algae
		amount = 1000
		@amount *= #$/refPower$
		maxAmount = 1000
		@maxAmount *= #$/refPower$
	}
	RESOURCE
	{
		name = ElectricCharge
		amount = 500
		@amount *= #$/refPower$
		maxAmount = 500
		@maxAmount *= #$/refPower$
	}
}

@PART[mmgh-alg-*]:NEEDS[!Kerbalism]:FOR[MoldaviteMachines]
{
	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = #LOC_mmgh_algae
		StartActionName = #LOC_mmgh_algaeStart
		StopActionName = #LOC_mmgh_algaeStop
		ToggleActionName = #LOC_mmgh_algaeToggle
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		Tag = MMGH-AL
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.01
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 15
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Algae
			Ratio = 0.1
			@Ratio *= #$/refPower$
			DumpExcess = False
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
	MODULE:NEEDS[CommunityResourcePack]
	{
		name = ModuleResourceConverter
		ConverterName = #LOC_mmgh_watersplit
		StartActionName = #LOC_mmgh_watersplitStart
		StopActionName = #LOC_mmgh_watersplitStop
		ToggleActionName = #LOC_mmgh_watersplitToggle
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		Tag = MMGH-ALWS
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.28832 // Let's assume Ore is 25% water
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		INPUT_RESOURCE
		{
			ResourceName = Algae
			Ratio = 0.00001
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 1.1404
			@Ratio *= #$/refPower$
			DumpExcess = False
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = 0.128
			@Ratio *= #$/refPower$
			DumpExcess = True
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
}
@PART[mmgh-pbr-*]:FOR[MoldaviteMachines]
{
	RESOURCE
	{
		name = Photoculture
		amount = 1000
		@amount *= #$/refPower$
		maxAmount = 1000
		@maxAmount *= #$/refPower$
	}
	RESOURCE
	{
		name = ElectricCharge
		amount = 500
		@amount *= #$/refPower$
		maxAmount = 500
		@maxAmount *= #$/refPower$
	}
}
	
@PART[mmgh-pbr-*]:NEEDS[!Kerbalism]:FOR[MoldaviteMachines]
{
	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = #LOC_mmgh_photoculture
		StartActionName = #LOC_mmgh_photocultureStart
		StopActionName = #LOC_mmgh_photocultureStop
		ToggleActionName = #LOC_mmgh_photocultureToggle
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		Tag = MMGH-PC
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.01
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 15
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Photoculture
			Ratio = 0.1
			@Ratio *= #$/refPower$
			DumpExcess = False
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
	MODULE
	{
		name = ModuleResourceConverter // using moles
		ConverterName = #LOC_mmgh_lf
		StartActionName = #LOC_mmgh_lfStart
		StopActionName = #LOC_mmgh_lfStop
		ToggleActionName = #LOC_mmgh_lfToggle
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		Tag = MMGH-PCLF
		INPUT_RESOURCE
		{
			ResourceName = Photoculture
			Ratio = 0.0001
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.60992 // 25% efficiency
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = LiquidFuel
			Ratio = 0.0681 // 2 mol
			@Ratio *= #$/refPower$
			DumpExcess = False
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = 0.2368 // 37 mol
			@Ratio *= #$/refPower$
			DumpExcess = True
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
	MODULE:NEEDS[CommunityResourcePack]
	{
		name = ModuleResourceConverter
		ConverterName = #LOC_mmgh_lch4
		StartActionName = #LOC_mmgh_lch4Start
		StopActionName = #LOC_mmgh_lch4Stop
		ToggleActionName = #LOC_mmgh_lch4Toggle
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		Tag = MMGH-PCCH4
		INPUT_RESOURCE
		{
			ResourceName = Photoculture
			Ratio = 0.0001
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.6404 // 25% efficiency
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = LqdMethane
			Ratio = 0.7542 // 20 mol
			@Ratio *= #$/refPower$
			DumpExcess = False
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = 0.256 // 40 mol
			@Ratio *= #$/refPower$
			DumpExcess = True
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
	MODULE:NEEDS[CommunityResourcePack]
	{
		name = ModuleResourceConverter
		ConverterName = #LOC_mmgh_ethanol
		StartActionName = #LOC_mmgh_ethanolStart
		StopActionName = #LOC_mmgh_ethanolStop
		ToggleActionName = #LOC_mmgh_ethanolToggle
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		Tag = MMGH-PCETH
		INPUT_RESOURCE
		{
			ResourceName = Photoculture
			Ratio = 0.0001
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		INPUT_RESOURCE
		{
			ResourceName = Ore
			@Ratio = 0.681984 // 25% efficiency
			@Ratio *= #$/refPower$
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Ethanol
			Ratio = 0.7007 // 12 mol
			@Ratio *= #$/refPower$
			DumpExcess = False
			FlowMode = STAGE_PRIORITY_FLOW
		}
		OUTPUT_RESOURCE
		{
			ResourceName = Oxidizer
			Ratio = 0.2304 // 36 mol
			@Ratio *= #$/refPower$
			DumpExcess = True
			FlowMode = STAGE_PRIORITY_FLOW
		}
	}
}

@PART[mmgh-alg-*,mmgh-pbr-*,mmgh-agr-*]:NEEDS[CommunityCategoryKit]
{
	@category = none
}