require "Foraging/forageSystem"
require "Foraging/forageDefinitions"

function potatoForagingAdd()

local potatoItems = {
	normal = {
		chance = 100,
		xp = 1,
		items = {
			Potato                     = "farming.Potato",
		},
	},
};
for _, spawnTable in pairs(potatoItems) do
	for itemName, itemFullName in pairs(spawnTable.items) do
		forageSystem.addItemDef({
			type = itemFullName,
			skill = 2,
			xp = spawnTable.xp,
			snowChance = -40,
			categories = { "Crops" },
			zones = {
				Forest      = 5,
				DeepForest  = 5,
				Vegitation  = 5,
				FarmLand    = 140,
				Farm        = 40,
				TrailerPark = 0,
				TownZone    = 0,
				Nav         = spawnTable.chance,
			},
			months = { 3, 4, 5, 6, 7, 8, 9, 10, 11 },
			bonusMonths = { 10, 11 },
			malusMonths = { 1, 2, 3, 4, 5, 6 },
			spawnFuncs = { doWildFoodSpawn, doRandomAgeSpawn, doWildCropSpawn },
			forceOutside = false,
			canBeAboveFloor = true,
			itemSizeModifier = 0.5,
			altWorldTexture = getTexture("media/textures/Foraging/worldSprites/wildpotato_worldSprite.png"),
		});
	end;
end;

end

Events.onAddForageDefs.Add(potatoForagingAdd);


