

-- apples
print("register fruit type: apples");
local appleshudFile = Utils.getFilename("mods/SlivoviceMap/scripte/hud/applesHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("apples", g_i18n:getText("apples"), false, false, false, 0, 4, 6, 0, 0, 0.35, 30, 1, true, appleshudFile, {0.6, 0.7, 0.4, 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["sugarBeet"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["apples"].index);
		end;
	end
end;


-- apricots
print("register fruit type: apricots");
local apricotshudFile = Utils.getFilename("mods/SlivoviceMap/scripte/hud/apricotsHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("apricots", g_i18n:getText("apricots"), false, false, false, 0, 4, 6, 0, 0, 0.35, 30, 1, true, apricotshudFile, {0.6, 0.7, 0.4, 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["sugarBeet"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["apricots"].index);
		end;
	end
end;


-- pears
print("register fruit type: pears");
local pearshudFile = Utils.getFilename("mods/SlivoviceMap/scripte/hud/pearsHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("pears", g_i18n:getText("pears"), false, false, false, 0, 4, 6, 0, 0, 0.35, 30, 1, true, pearshudFile, {0.6, 0.7, 0.4, 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["sugarBeet"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["pears"].index);
		end;
	end
end;


-- plums
print("register fruit type: plums");
local plumshudFile = Utils.getFilename("mods/SlivoviceMap/scripte/hud/plumsHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("plums", g_i18n:getText("plums"), false, false, false, 0, 4, 6, 0, 0, 0.35, 30, 1, true, plumshudFile, {0.6, 0.7, 0.4, 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["sugarBeet"];
		if v == fruitTypeDesc.index then
			table.insert(self.seeds, FruitUtil.fruitTypes["plums"].index);
		end;
	end
end;
