configCraft.lua

Config.Craft = {}

Config.Craft[#Config.Craft+1] = {
    category = "defaultCraft", -- Must be uniq
    label = "Main Craft",
    items = {
        {
            type = "item",
            giveAmount = 1,
            name = 'lockpick',
            costs = {
                ['metalscrap'] = 22,
                ['plastic'] = 32,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'screwdriverset',
            costs = {
                ['metalscrap'] = 30,
                ['plastic'] = 42,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'electronickit',
            costs = {
                ['metalscrap'] = 30,
                ['plastic'] = 45,
                ['aluminum'] = 28,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'radioscanner',
            costs = {
                ['electronickit'] = 2,
                ['plastic'] = 52,
                ['steel'] = 40,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'gatecrack',
            costs = {
                ['metalscrap'] = 10,
                ['plastic'] = 50,
                ['aluminum'] = 30,
                ['iron'] = 17,
                ['electronickit'] = 2,
            },
        },

    }
}


Config.defaultCraftJob = {}

-- Example for police
Config.defaultCraftJob.police = {
    label = "Police Crafting",
    items = {
        {
            type = "item",
            giveAmount = 1,
            name = 'handcuffs',
            costs = {
                ['metalscrap'] = 36,
                ['steel'] = 24,
                ['aluminum'] = 28,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'repairkit',
            costs = {
                ['metalscrap'] = 32,
                ['steel'] = 43,
                ['plastic'] = 61,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'pistol_ammo',
            costs = {
                ['metalscrap'] = 50,
                ['steel'] = 37,
                ['copper'] = 26,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'ironoxide',
            costs = {
                ['iron'] = 60,
                ['glass'] = 30,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'aluminumoxide',
            costs = {
                ['aluminum'] = 60,
                ['glass'] = 30,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'armor',
            costs = {
                ['iron'] = 33,
                ['steel'] = 44,
                ['plastic'] = 55,
                ['aluminum'] = 22,
            },
        },
        {
            type = "item",
            giveAmount = 1,
            name = 'drill',
            costs = {
                ['iron'] = 50,
                ['steel'] = 50,
                ['screwdriverset'] = 3,
                ['advancedlockpick'] = 2,
            },
        },
    }
}

local craftCategory = {}
for i=1, #Config.Craft do
    craftCategory[i] = {
        craft = i,
        label = Config.Craft[i].label
    }
end

exports("craftCategory", function()
    return craftCategory
end)

Last updated