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

local function generateHerbalistDefs()
    local items = {
        -- Ora usiamo direttamente il nome dell'item perché sono nel modulo Base
        HoneyComb = {
            type = "Base.HoneyComb",
            minCount = 1,
            maxCount = 2,
            skill = 4,
            xp = 5,
            categories = { "Insects" },
            zones = {
                Forest = 10,
                DeepForest = 20,
                PHForest = 10,
                PRForest = 10,
                BirchForest = 10,
                OrganicForest = 15,
                Vegitation = 5,
                FarmLand = 5,
                Farm = 5,
                ForagingNav = 10,
            },
            months = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
            malusMonths = { 9, 10, 11, 12, 1, 2 },
            forceOutside = true,
            canBeOnTreeSquare = true,
        },
        Sap = {
            type = "Base.Sap",
            minCount = 1,
            maxCount = 3,
            skill = 4,
            xp = 5,
            categories = { "WildPlants" },
            zones = {
                Forest = 15,
                DeepForest = 15,
                PHForest = 10,
                PRForest = 10,
                BirchForest = 20,
                OrganicForest = 15,
                Vegitation = 5,
                ForagingNav = 5,
            },
            months = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
            malusMonths = { 5, 6, 7, 8, 9 },
            forceOutside = true,
            canBeOnTreeSquare = true,
        },
        Saltrock = {
            type = "Base.Saltrock",
            minCount = 1,
            maxCount = 2,
            skill = 4,
            xp = 5,
            categories = { "Stones" },
            zones = {
                Forest = 10,
                DeepForest = 10,
                PHForest = 6,
                PRForest = 6,
                BirchForest = 6,
                OrganicForest = 15,
                Vegitation = 3,
                ForagingNav = 3,
            },
            months = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
            malusMonths = {11, 12, 1},
            forceOutside = true,
            canBeOnTreeSquare = false,
        },
    };

    for itemName, itemDef in pairs(items) do
        forageSystem.addForageDef(itemName, itemDef);
    end;
end

generateHerbalistDefs();
