---@diagnostic disable: missing-return ---@class CraftRecipe ---@field duration number ms it takes to craft the recipe. ---@field client? CallbackFunc Contains client-side functions to be executed before and after crafting. ---@field server? CallbackFunc Contains server-side functions to be executed before and after crafting. ---@field result ItemResult[] The items produced as a result of the crafting process. ---@field costs table The resources required for crafting, including their quantities and removal flags. ---@class CallbackFunc ---@field before fun(recipeData: CraftRecipe):boolean ---@field after fun(recipeData: CraftRecipe):boolean ---@class ItemResult ---@field name string The name of the item. ---@field amount number The amount of the item produced. ---@class CraftCost ---@field need number The quantity of the item needed for crafting. ---@field remove boolean Whether the item should be removed after crafting. ---@type table local RECIPES = { ['p_haze weed_papers'] = { duration = 3000, client = { before = function(recipeData) -- some client logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some client logic to run after crafting -- returns boolean or nil end, }, server = { before = function(recipeData) -- some server logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some server logic to run after crafting -- returns boolean or nil end, }, costs = { ['weed_papers'] = { need = 1, remove = true }, ['ls_purple_haze_bag'] = { need = 1, remove = true }, }, result = { { name = 'ls_purple_haze_joint', amount = 1 }, -- { name = 'something', amount = 1 } }, }, -- Additional recipes can be added here ['ls_orange weed_papers'] = { duration = 3000, client = { before = function(recipeData) -- some client logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some client logic to run after crafting -- returns boolean or nil end, }, server = { before = function(recipeData) -- some server logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some server logic to run after crafting -- returns boolean or nil end, }, costs = { ['weed_papers'] = { need = 1, remove = true }, ['ls_orange_crush_bag'] = { need = 1, remove = true }, }, result = { { name = 'ls_orange_crush_joint', amount = 1 }, -- { name = 'something', amount = 1 } }, }, -- Additional recipes can be added here ['ls_cosmic weed_papers'] = { duration = 3000, client = { before = function(recipeData) -- some client logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some client logic to run after crafting -- returns boolean or nil end, }, server = { before = function(recipeData) -- some server logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some server logic to run after crafting -- returns boolean or nil end, }, costs = { ['weed_papers'] = { need = 1, remove = true }, ['ls_cosmic_kush_bag'] = { need = 1, remove = true }, }, result = { { name = 'ls_cosmic_kush_joint', amount = 1 }, -- { name = 'something', amount = 1 } }, }, -- Additional recipes can be added here ['ls_bluedream weed_papers'] = { duration = 3000, client = { before = function(recipeData) -- some client logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some client logic to run after crafting -- returns boolean or nil end, }, server = { before = function(recipeData) -- some server logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some server logic to run after crafting -- returns boolean or nil end, }, costs = { ['weed_papers'] = { need = 1, remove = true }, ['ls_blue_dream_bag'] = { need = 1, remove = true }, }, result = { { name = 'ls_blue_dream_joint', amount = 1 }, -- { name = 'something', amount = 1 } }, }, -- Additional recipes can be added here ['ls_banana weed_papers'] = { duration = 3000, client = { before = function(recipeData) -- some client logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some client logic to run after crafting -- returns boolean or nil end, }, server = { before = function(recipeData) -- some server logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some server logic to run after crafting -- returns boolean or nil end, }, costs = { ['weed_papers'] = { need = 1, remove = true }, ['ls_banana_kush_bag'] = { need = 1, remove = true }, }, result = { { name = 'ls_banana_kush_joint', amount = 1 }, -- { name = 'something', amount = 1 } }, }, -- Additional recipes can be added here ['ls_plainjane weed_papers'] = { duration = 3000, client = { before = function(recipeData) -- some client logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some client logic to run after crafting -- returns boolean or nil end, }, server = { before = function(recipeData) -- some server logic to run before crafting -- if this returns false, it will cancel the craft -- returning true or nil will continue with the craft end, after = function(recipeData) -- some server logic to run after crafting -- returns boolean or nil end, }, costs = { ['weed_papers'] = { need = 1, remove = true }, ['ls_plain_jane_bag'] = { need = 1, remove = true }, }, result = { { name = 'ls_plain_jane_joint', amount = 1 }, -- { name = 'something', amount = 1 } }, }, -- Additional recipes can be added here } return RECIPES