
--
-- fruitTypePotato
--
-- @author Mobbingpapst
-- @date  05.04.2012

print("register fruit type: potato");
local hudFile = Utils.getFilename("mods/Meyenburg/Meyenburg/fruits/potatoHud.png", getUserProfileAppPath());
--						        (string name,			bool needsSeeding, 	bool allowsSeeding, 	bool hasStraw, 	int minHarvestingGrowthState, 	float pricePerLiter, 	float literPerQm, 		float seedUsagePerQm, 		float seedPricePerLiter, 	string hudFruitOverlayFilename) 	"C:/Dokumente und Einstellungen/+++/Eigene Dateien/My Games/FarmingSimulator2011/mods/Potato/potatoHud.png"
FruitUtil.registerFruitType("potato",	true, 			true,			false, 		4, 			   			0.20, 			5, 				0.5, 				0.5, 				hudFile);	
	
--local origLoadStatsFromXML = QuickPlayMenu.loadStatsFromXML;
local origSowingMachineLoad = SowingMachine.load;

SowingMachine.load = function (self, xmlFile)
	if origSowingMachineLoad ~= nil then
		origSowingMachineLoad(self, xmlFile);
	end;
	
	self.seeds = {};
	local i = 1;
    for k, fruitType in pairs(FruitUtil.fruitTypes) do
        if fruitType.allowsSeeding then
            self.seeds[i] = fruitType.index;
			i = i + 1;
        end;
    end;	
end;

