textureDir = "level/treatmentfactory/textures/";

SetScoreFactor{
	scoreFactor = 18
};

CreateHole {

	textureName = 	textureDir.."animations/anim_expotanima.xml",
	
		 
	position = {
		x = 205,
		y = 460	
	},
	
	center = {x = 31, y =31},
	-- the first shape its the sensor, then the "walls"
	shapePoints = {
		{ { 35,9}, { 17, 16 }, { 10, 35 }, { 17, 53 },{ 35, 61} ,{ 54,55} ,{ 62, 35},{54,15}   },
	},
};

CreateHole {

	textureName = 	textureDir.."animations/anim_expotanima.xml",
	
		 
	position = {
		x = 391,
		y = 235	
	},
	
	center = {x = 31, y =31},
	-- the first shape its the sensor, then the "walls"
	shapePoints = {
		{ { 35,9}, { 17, 16 }, { 10, 35 }, { 17, 53 },{ 35, 61} ,{ 54,55} ,{ 62, 35},{54,15}   },
	},
};

CreateHole {

	textureName = 	textureDir.."animations/anim_expotanima.xml",
	
		 
	position = {
		x = 762,
		y = 235	
	},
	
	center = {x = 31, y =31},
	-- the first shape its the sensor, then the "walls"
	shapePoints = {
		{ { 35,9}, { 17, 16 }, { 10, 35 }, { 17, 53 },{ 35, 61} ,{ 54,55} ,{ 62, 35},{54,15}   },
	},
};

CreateHole {

	textureName = 	textureDir.."animations/anim_expotanima.xml",
	
		 
	position = {
		x = 945,
		y = 460	
	},
	
	center = {x = 31, y =31},
	-- the first shape its the sensor, then the "walls"
	shapePoints = {
		{ { 35,9}, { 17, 16 }, { 10, 35 }, { 17, 53 },{ 35, 61} ,{ 54,55} ,{ 62, 35},{54,15}   },
	},
};

CreateIngredientGenerator {

	textureName = 	textureDir.."stone",
	ingredientType = 1,
	working = false, -- we want this ingredient generator working since the game begins
	
	generatorTextureName = textureDir.."generator1",
	--max number of drops
	maxDropNum =     100,
	--time between the creation of drops
	uTimeBetweenCreation =500,
	
	-- ingredient properties
	ingredientPhysics = {
	
		friction = 1,
		radius = 0.3,
		restitution = 0,
		density = 0.03,
	},
	
	position = {
		x = 206,
		y = 40	
	},
	dropPosition = {
		x = 0,
		y = 56	
	},
	
	maxvelocity = {
		x = 0.01,
		y = 0.5	
	},


};

CreateIngredientGenerator {

	textureName = 	textureDir.."stone",
	ingredientType = 4,
	working = false, -- we want this ingredient generator working since the game begins
	
	generatorTextureName = textureDir.."generator4",
	--max number of drops
	maxDropNum =     100,
	--time between the creation of drops
	uTimeBetweenCreation =500,
	
	-- ingredient properties
	ingredientPhysics = {
	
		friction = 1,
		radius = 0.3,
		restitution = 0,
		density = 0.03,
	},
	
	position = {
		x = 391,
		y = 40
	},
	dropPosition = {
		x = 0,
		y = 56	
	},
	
	maxvelocity = {
		x = 0.01,
		y = 0.5	
	},


};

CreateIngredientGenerator {

	textureName = 	textureDir.."stone",
	ingredientType = 0,
	working = false, -- we want this ingredient generator working since the game begins
	
	generatorTextureName = textureDir.."generator0",
	--max number of drops
	maxDropNum =     100,
	--time between the creation of drops
	uTimeBetweenCreation =500,
	
	-- ingredient properties
	ingredientPhysics = {
	
		friction = 0.05,
		radius = 0.3,
		restitution = 0,
		density = 0.03,
	},
	
	position = {
		x = 762,
		y = 40	
	},
	dropPosition = {
		x = 0,
		y = 56	
	},
	
	maxvelocity = {
		x = 0.01,
		y = 0.5	
	},


};

CreateIngredientGenerator {

	textureName = 	textureDir.."stone",
	generatorTextureName = textureDir.."generator3",
	ingredientType = 3,
	working = false, -- we dont want this ingredient generator working since the game begins
	--max number of drops
	maxDropNum =     100,
	--time between the creation of drops
	uTimeBetweenCreation =500,
	
	-- ingredient properties
	ingredientPhysics = {
	
		friction = 1,
		radius = 0.3,
		restitution = 0,
		density =  0.03,
	},
	
	position = {
		x =948,
		y = 45	
	},
	
	dropPosition = {
		x = 0,
		y = 56	
	},
	
	maxvelocity = {
		x = 0.01,
		y = 0.5	
	},


};




CreateBasketManager {

	textureName = 	textureDir.."basket",

	filledTextureName = 	textureDir.."bottle",
	
	--time spended from the combination achieved until the bottle goes away
	timeShowingBottle = 0.4;


	maxBaskets= 1,

	center = {x = 73, y = 62},

	
	shapePoints = {
		{ { 17, 24 }, { 63,59 }, { 132, 19  } },  --we use the first shape to know what its "inside"
		{ { 5, 15 }, { 33, 99 }, { 111, 99 } },
		{ { 111, 99 }, {143,7 }, {64, 59} },
		{ {72, 22 },  { 58,38}, { 58,80}, {84, 80} , { 84, 38} }, 
		--{ { 34, 36 }, {4, 50 }, { 102, 54}, { 70, 37} }, --- we use the last shape as a lid / top		
 	},

	--that will be a vector of combination , each combination is a   	--vector of ingredienttypes and the fix number of them or the 	--rang between a random number will be chose
	--{ingredientType,fixnumber,maxnumber,minnumber}
	--fixnumber must be 0 if we want to use a random number between 	--the max and min number
		
	combinations = {

		{--combination 1
		
			-- { Treatment type }
			{0},--Chocolate
			
			--{ingredientType,fixnumber,minnumber,maxnumber}

			{0,0,7,7}, 
			{1,0,7,7}, 

		},
		{--combination 2
		
			-- { Treatment type }
			{1},--Shea butter
			
			--{ingredientType,fixnumber,maxnumber,minnumber}

			{3,0,7,7},  
			{4,0,7,7},  
		
	
		},
	},

	--basket properties


	speed = 1200,

	direction = {
		x = -1,
		y = 0,	
	},

	--the final position of each of the baskets that are going to be displayed at once (in this exempre 3)
	finalPosition = {

	
		--{x initial position , x final position , y position}
		{425,740,635}, -- first basket
		--{500,600,600}, -- second basket
		--{800,600,600}, -- thirth basket


	},
	
	boxScorePosition = {
		{-35,25}, -- left Score
		{35,25}, -- right Score	
	}



};



--~ CreateConveyorBelt{

--~ 	--conveyor belt proerties
--~ 	
--~ 	textureName = 	textureDir.."conveyor_big",
--~ 	
--~ 	isdraggable = false;

--~ 	width = 1024,
--~ 	height = 15,

--~ 	position = {
--~ 		x = 512,
--~ 		y = 700	
--~ 	},
--~ 	--cogsteeths properties
--~ 	cognumber = 50,
--~ 	cogwidth = 10,
--~ 	cogheight = 16,
--~ 	motorspeed = 1,
--~ 	maxmotorforce =6000 ,
--~ 	directionX = 1,
--~ 	directionY =0,
--~ 	angle=0,
--~ 	

--~ }
--~ CreatePlanePieces {


--~ 	textureName = 	textureDir.."piece11",
--~ 	
--~ 	isdraggable = false;
--~ 	
--~ 	position = {
--~ 		x = 510, y =300
--~ 	},
--~ 	
--~ 	center = {x = 250, y = 50},

--~ 	shapePoints = {
--~ 		{ 
--~ 			{3,95 }, { 500, 100}, { 262, 0 },
--~ 		},
--~ 	},
--~ 	
--~ -- ingredient properties
--~ 	piecePhysics = {
--~ 	
--~ 		friction = 13, 
--~ 		restitution =  0,
--~ 		density =  1,
--~ 	},

--~ }

--~ CreateBasket{

--~ 	textureName = 	textureDir.."basket",
--~ 	
--~ 	-- a map of ingredients that the basket requieres
--~ 	-- { IngredientType, NumberofTheseIngredients}
--~ 	ingredientsRequired = {
--~ 		{ 3, 12 },
--~ 		{ 2, 6 }
--~ 	},
--~ 	
--~ 	 
--~ 	position = {
--~ 		x = 850,
--~ 		y = 650	
--~ 	},
--~ 	
--~ 	center = {x = 54, y = 65},
--~ 	-- the first shape its the sensor, then the "walls"
--~ 	shapePoints = {
--~ 		{ { 16, 70 }, { 23, 79 }, { 85, 79 }, { 83, 70 } },
--~ 		{ { 11, 42 }, { 3, 55 }, { 23, 102 }, { 54, 114} },
--~ 		{ { 106, 58 }, {91, 40 }, { 55, 113}, { 82, 106} },
--~  	},



--~ };


