-- Sunflower
print("register fruit type: Sunflower");
local sunflowerhudFile = Utils.getFilename("huds/sunflowerHud.dds", g_currentModDirectory);
FruitUtil.registerFruitType("sunflower", g_i18n:getText("sunflower"), true, true, false, 0, 4, 6, 8, 0, 0.9, 1.2, 0.1, true, sunflowerhudFile, {0.1, 0.1, 0.5, 1});	
	
	
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad =  Trailer.load;

SowingMachine.load = function (self, xmlFile)
	if origSowingMachineLoad ~= nil then
		origSowingMachineLoad(self, xmlFile);
	end;
	
	for k,v in pairs(self.seeds) do  
		fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["sunflower"].index);
		end;
	end
end;


-- Oat
print("register fruit type: Oat");
local oathudFile = Utils.getFilename("huds/oatHud.dds", g_currentModDirectory);
FruitUtil.registerFruitType("oat", g_i18n:getText("oat"), true, true, false, 0, 4, 6, 8, 0, 0.9, 1.2, 0.1, true, oathudFile, {0.8, 0.8, 0.8, 1});	
	
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad =  Trailer.load;

SowingMachine.load = function (self, xmlFile)
	if origSowingMachineLoad ~= nil then
		origSowingMachineLoad(self, xmlFile);
	end;
	
	for k,v in pairs(self.seeds) do  
		fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["oat"].index);
		end;
	end
end;


-- Greenwheat
print("register fruit type: Greenwheat");
local greenwheathudFile = Utils.getFilename("huds/greenwheatHud.dds", g_currentModDirectory);
FruitUtil.registerFruitType("greenwheat", g_i18n:getText("greenwheat"), true, true, false, 0, 4, 6, 8, 0, 0.9, 1.2, 0.1, true, greenwheathudFile, {0.1, 0.7, 0.6, 1});	
	
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad =  Trailer.load;

SowingMachine.load = function (self, xmlFile)
	if origSowingMachineLoad ~= nil then
		origSowingMachineLoad(self, xmlFile);
	end;
	
	for k,v in pairs(self.seeds) do  
		fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["greenwheat"].index);
		end;
	end
end;

-- Cotton
print("register fruit type: Cotton");
local cottonhudFile = Utils.getFilename("huds/cottonHud.dds", g_currentModDirectory);
FruitUtil.registerFruitType("cotton", g_i18n:getText("cotton"), true, true, false, 0, 4, 6, 8, 0, 0.9, 1.2, 0.1, true, cottonhudFile, {0.1, 0.1, 0.8, 1});	
	
	
local origSowingMachineLoad = SowingMachine.load;
local orig TrailerLoad =  Trailer.load;

SowingMachine.load = function (self, xmlFile)
	if origSowingMachineLoad ~= nil then
		origSowingMachineLoad(self, xmlFile);
	end;
	
	for k,v in pairs(self.seeds) do  
		fruitTypeDesc = FruitUtil.fruitTypes["wheat"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["cotton"].index);
		end;
	end
end;