module Packing
{
	imports
	{
		Base,
	}
	
	item 10pkMatches
	{
		Weight			= 0.5,
		Type			= Normal,
		DisplayName		= 10 x Matches,
		DisplayCategory = LightSource,
		Icon			= PMatches,
		WorldStaticModel= PackOfMatches,
	}
	
	item 5pkMatches
	{
		Weight			= 0.35,
		Type			= Normal,
		DisplayName		= 5 x Matches,
		DisplayCategory = LightSource,
		Icon			= PMatches,
		WorldStaticModel= PackOfMatches,
	}

	recipe Pack 10
	{
		destroy Matches=10,
		
		Result:10pkMatches,
		OnCreate:Recipe.OnCreate.SaveUses,
		OnTest:Recipe.OnTest.IsFavorite,
		Time:75.0,
		Category:Storage,
	}
	
	recipe Unpack 10
	{
		destroy 10pkMatches,
		
		Result:Matches,
		OnCreate:Recipe.OnCreate.LoadUses,
		RemoveResultItem:true,
		Time:50.0,
		Category:Storage,
	}
	
	recipe Pack 5
	{
		destroy Matches=5,
		
		Result:5pkMatches,
		OnCreate:Recipe.OnCreate.SaveUses,
		OnTest:Recipe.OnTest.IsFavorite,
		Time:50.0,
		Category:Storage,
	}
	
	recipe Unpack 5
	{
		destroy 5pkMatches,
		
		Result:Matches,
		OnCreate:Recipe.OnCreate.LoadUses,
		RemoveResultItem:true,
		Time:25.0,
		Category:Storage,
	}

	recipe Put Together
	{
		5pkMatches=2,
		
		Result:10pkMatches=1,
		OnCreate:Recipe.OnCreate.MergeUses,
		Time:30.0,
	}

	recipe Split in Two
	{
		10pkMatches=1,
		
		Result:5pkMatches,
		OnCreate:Recipe.OnCreate.SplitUsesInTwo,
		RemoveResultItem:true,
		Time:30.0,
	}

	model PackOfMatches
	{
		mesh = WorldItems/pack_of_matches,
		texture = WorldItems/Matches,
		scale = 1.0,
	}
}