-- Hafer
print("register fruit type: oat");
local oathudFile = Utils.getFilename("mods/Birchwood_v2/map/huds/oatHud.dds", getUserProfileAppPath());
FruitUtil.registerFruitType("oat", oat, true, true, false, 0, 4, 6, 8, 0, 0.9, 1.2, 0.1, true, oathudFile, {0.8, 0.8, 0.8, 1});
FruitUtil.registerFruitTypeWindrow(FruitUtil.FRUITTYPE_OAT, "barley_windrow", g_i18n:getText("straw"), 0.04, 3, true, "dataS2/missions/hud_fill_straw.png");	
	
	
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;