@PART[mmgh-agr-*]:NEEDS[SnacksUtils]:FOR[MoldaviteMachines]
{
	MODULE
	{
		name = SnacksConverter
		ConverterName = Hydroponics
		StartActionName = Start Hydroponics
		StopActionName = Stop Hydroponics
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = true
		SpecialistEfficiencyFactor = 0.2
		ExperienceEffect = ScienceSkill
		EfficiencyBonus = 1
		hoursPerCycle = 168 //Number of hours to grow crops
		minimumSuccess = 1
		criticalSuccess = 90
		criticalFail = 5

		criticalSuccessBonus = 0.25
		failureLoss = 0.25

		INPUT_RESOURCE
		{
			ResourceName = Ore
			Ratio = 0.0000218750
			@Ratio *= #$/refPower$
		}

		INPUT_RESOURCE:NEEDS[SnacksFreshAir]
		{
			ResourceName = StaleAir
			Ratio = 0.0000218750
			@Ratio *= #$/refPower$
		}

		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 12
			@Ratio *= #$/refPower$
		}

		OUTPUT_RESOURCE:NEEDS[SnacksFreshAir]
		{
			ResourceName = FreshAir
			Ratio = 0.00002
			@Ratio *= #$/refPower$
		}

		// Calibrated for 1 snack per meal, 3 meals per day
		// Supports 2 kerbals
		YIELD_RESOURCE
		{
			ResourceName = Snacks
			Ratio = 168
			@Ratio *= #$/refPower$
		}
	}
}
@PART[mmgh-agr-*]:NEEDS[SnacksStress]
{
	MODULE
	{
		name = SnacksConverter
		ConverterName = GrassTouching
		StartActionName = Touch Grass
		StopActionName = That's enough
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		
		//At least one crew needs to be in the part to run the converter.
		minimumCrew = 1

		//Connection back home required to receive entertainment.
		requiresHomeConnection = false

		//This condition is set whenever the kerbal enters the part and the converter is active, and
		//when the converter is started. Since it's registered as a SKILL_LOSS_CONDITION, the kerbals will lose their
		//skills while the converter is running.
		conditionSummary = GrassTouching

		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.05
			@Ratio *= #$/refPower$
			FlowMode = ALL_VESSEL
		}

		//Works like an INPUT_RESOURCE except:
		// It applies to individual kerbals.
		// You can specify an AmountPerDay or AmountPerSecond.
		ROSTER_INPUT_RESOURCE
		{
			ResourceName = Stress

			//AmountPerDay will be translated into: AmountPerDay / seconds per homeworld day
			//This will override AmountPerSecond if it is defined in the node.
			AmountPerDay = 1.5
		}
	}
}
SKILL_LOSS_CONDITION:NEEDS[SnacksStress]
{
	name = GrassTouching
}

@PART[mmgh-alg-*]:NEEDS[SnacksFreshAir]
{
	MODULE
	{
		name = SnacksConverter
		ConverterName = Air Scrubber
		StartActionName = Start Air Scrubber
		StopActionName = Stop Air Scrubber
		AutoShutdown = false
		GeneratesHeat = false
		UseSpecialistBonus = false
		
		INPUT_RESOURCE
		{
			ResourceName = StaleAir
			Ratio = 0.000185
			@Ratio *= #$/refPower$
			FlowMode = ALL_VESSEL
		}

		INPUT_RESOURCE
		{
			ResourceName = Algae
			Ratio = 0.00001
			@Ratio *= #$/refPower$
			FlowMode = ALL_VESSEL
		}

		OUTPUT_RESOURCE
		{
			ResourceName = FreshAir
			Ratio = 0.000074
			@Ratio *= #$/refPower$
			FlowMode = ALL_VESSEL
		}
	}
}
