Config

Config = {}

Config.CraftingLocations = {
    ['electronics_workshop'] = {
        label = 'Electronics workshop',
        coords = vector4(706.4235, -976.6620, 24.1704, 49.4918),
        prop = nil, -- No prop for this location
        job = {'police', 'sheriff'},
        baseRecipes = {
            ['radio'] = {
                label = 'Radio',
                icon = 'radio',
                duration = 5000,
                requiredItems = {
                    {name = 'plastic', count = 2},
                    {name = 'metal', count = 1}
                },
                resultItems = {
                    {name = 'radio', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        },
        availableUpgrades = {'speed'}
    },
    
    ['weapons_bench'] = {
        label = 'Weapons Bench',
        coords = vector4(710.1184, -978.9808, 24.1089, 356.3275),
        prop = 'xm3_prop_xm3_bench_03b',
        job = nil,
        baseRecipes = {
            ['knife'] = {
                label = 'Knife',
                icon = 'knife',
                duration = 8000,
                requiredItems = {
                    {name = 'metal', count = 3},
                    {name = 'wood', count = 1}
                },
                resultItems = {
                    {name = 'weapon_knife', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        },
        availableUpgrades = {'speed', 'durability'}
    },
    
    ['chemistry_lab'] = {
        label = 'Chemistry laboratory',
        coords = vector4(713.5814, -978.3513, 24.1165, 85.7653),
        prop = 'gr_prop_gr_bench_02b',
        job = nil,
        baseRecipes = {
            ['chemical_base'] = {
                label = 'Chemical base',
                icon = 'flask',
                duration = 12000,
                requiredItems = {
                    {name = 'water', count = 2},
                    {name = 'salt', count = 1}
                },
                resultItems = {
                    {name = 'chemical_base', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        },
        availableUpgrades = {'speed'}
    },
    
    ['chemistry_lab2'] = {
        label = 'Chemistry laboratory',
        coords = vector4(702.0184, -975.8604, 24.3914, 2.1541),
        prop = nil,
        job = {'mechanic'},
        baseRecipes = {
            ['chemical_base'] = {
                label = 'Chemical base',
                icon = 'flask',
                duration = 12000,
                requiredItems = {
                    {name = 'water', count = 2},
                    {name = 'salt', count = 1}
                },
                resultItems = {
                    {name = 'chemical_base', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        },
        availableUpgrades = {'speed'}
    }
}

Config.Blueprints = {
    ['electronics_workshop'] = {
        {
            id = 'advanced_radio',
            label = 'Blueprint: Advanced radio',
            item = 'blueprint_advanced_radio',
            description = 'Unlock better radio',
            unlocks = {
                label = 'Advanced radio',
                icon = 'radio',
                duration = 8000,
                requiredItems = {
                    {name = 'plastic', count = 3},
                    {name = 'metal', count = 2},
                    {name = 'electronics', count = 1}
                },
                resultItems = {
                    {name = 'advanced_radio', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        },
        {
            id = 'phone',
            label = 'Blueprint: Phone',
            item = 'blueprint_phone',
            description = 'Unlock modern phone production.',
            unlocks = {
                label = 'Phone',
                icon = 'phone',
                duration = 15000,
                requiredItems = {
                    {name = 'plastic', count = 4},
                    {name = 'metal', count = 2},
                    {name = 'electronics', count = 2},
                    {name = 'battery', count = 1}
                },
                resultItems = {
                    {name = 'phone', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        }
    },
    
    ['weapons_bench'] = {
        {
            id = 'pistol',
            label = 'Blueprint: Pistol',
            item = 'blueprint_pistol',
            description = 'Unlock Pistol production.',
            unlocks = {
                label = 'Pistol',
                icon = 'gun',
                duration = 20000,
                requiredItems = {
                    {name = 'metal', count = 8},
                    {name = 'wood', count = 2},
                    {name = 'springs', count = 3}
                },
                resultItems = {
                    {name = 'weapon_pistol', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        }
    },
    
    ['chemistry_lab2'] = {
        {
            id = 'advanced_chemical',
            label = 'Blueprint: Advanced chemical',
            item = 'blueprint_advanced_chemical',
            description = 'Unlock clear chemical production.',
            unlocks = {
                label = 'Advanced chemical',
                icon = 'flask',
                duration = 25000,
                requiredItems = {
                    {name = 'chemical_base', count = 2},
                    {name = 'catalyst', count = 1},
                    {name = 'distilled_water', count = 3}
                },
                resultItems = {
                    {name = 'advanced_chemical', count = 1}
                },
                animation = {
                    dict = "mini@repair",
                    name = "fixing_a_ped"
                }
            }
        }
    }
}

Config.Upgrades = {
    ['speed'] = {
        label = 'Speed upgrade',
        icon = 'fa-clock',
        description = 'Faster production.',
        levels = {
            [1] = {cost = {name = 'money', count = 5000}, modifier = 0.9, description = '10% rychlejší'}, 
            [2] = {cost = {name = 'upgrade_chip', count = 2}, modifier = 0.8, description = '20% rychlejší'}, 
            [3] = {cost = {name = 'upgrade_chip', count = 5}, modifier = 0.7, description = '30% rychlejší'}
        }
    },

    ['durability'] = {
        label = 'Drurability',
        icon = 'fa-shield',
        description = 'Better drurability on weapons',
        levels = {
            [1] = {cost = {name = 'money', count = 8000}, modifier = 1.2, description = '20% odolnější'}, 
            [2] = {cost = {name = 'precision_tools', count = 2}, modifier = 1.4, description = '40% odolnější'}, 
            [3] = {cost = {name = 'precision_tools', count = 5}, modifier = 1.6, description = '60% odolnější'}
        }
    },
}

Config.Translate = {
     ['notify_title'] = 'Crafting System',
     ['crafting'] = 'Crafting',
     ['blueprint'] = 'Blueprint',
     ['blueprints'] = 'Blueprints',
     ['blueprints_description'] = 'Manage blueprints and new recipes',
     ['upgrade'] = 'Upgrade',
     ['upgrades'] = 'Upgrades',
     ['upgrades_description'] = 'Upgrade your crafting table',
     ['unlocked'] = 'Unlocked',
     ['locked'] = 'Locked',
     ['back'] = 'Back',
     ['back_to_crafting'] = 'Back to main menu',
     ['level'] = 'Level',
     ['price'] = 'Price',
     ['max'] = 'MAX',
     ['crafting'] = 'Crafting',
     ['production_cancelled'] = 'Production cancelled',
     ['you_dont_have'] = 'You don’t have',
     ['you_are_placing'] = 'You are placing',
     ['upgrade_max'] = 'Upgrade is at maximum level',
     ['use_blueprint'] = 'Use blueprint',
     ['buy_upgrade'] = 'Buy upgrade',
     ['not_enough_money'] = 'Not enough money',
     ['not_enough_items'] = 'Not enough items',
     ['not_enough'] = 'Not enough',
     ['upgrade_successful'] = 'Upgrade successful!',
     ['blueprint_used'] = 'Blueprint used, new recipe unlocked!',
     ['open'] = 'Open',
     ['required'] = 'Required',
     ['crafting_bench'] = 'Crafting bench',
     ['crafting_location'] = 'Crafting location',
     ['upgrade_available'] = 'Upgrade available',
     ['upgrade_cost'] = 'Upgrade cost: %s',
     ['upgrade_level'] = 'Upgrade level: %d/%d',
     ['upgrade_description'] = 'Description: %s',
     ['upgrade_success'] = 'Upgrade successfully applied!',
     ['upgrade_failed'] = 'Upgrade failed, try again later.',
     ['upgrade_purchased'] = 'Upgrade purchased',
     ['completed_crafting'] = 'Crafting completed successfully!',
     ['no_blueprints_available'] = 'No blueprints available.',
     ['blueprint_not_found'] = 'Blueprint not found',
     ['dont_have_blueprint'] = 'You don’t have this blueprint in your inventory',
     ['blueprint_already_used'] = 'This blueprint has already been used',
     ['blueprint_used_success'] = 'Blueprint used! New recipe unlocked:',
     ['successfuly_placed'] = 'You successfully placed',
     ['you_dont_have_item'] = 'You don’t have this item!',
     ['you_dont_have_enough_materials'] = 'You don’t have enough materials: ',
     ['production_finished'] = 'Production finished!',
     ['dont_have_enough_materials_for_upgrade'] = 'Not enough materials for upgrade!',
     ['to_the_level'] = 'to level',
     ['purchased'] = 'Purchased',
}

function Notify(message, type, title)
    lib.notify({
        title = title,
        description = message,
        type = type,
        showDuration = true,
    })
end


Last updated