Adding Items & Recipes
1. Define the item
shared/config_items.lua → Config.Items is the single source of truth. Add an entry:
{ name = 'my_burger', localeKey = 'item_my_burger', image = 'my_burger.webp',
category = 'general', -- 'meat' | 'veg' | 'dry' | 'general'
cost = 15, weight = 0.4, icon = 'ph ph-hamburger',
consumeTime = 5000, hunger = 30, thirst = 0,
propType = 'spatula' }, -- optional: hand prop while held / take-to-hand
Common fields:
| Field | Purpose |
|---|---|
name |
Inventory item id (must match your inventory). |
localeKey |
Key in locales.lua for the display label. |
image |
.webp in web/public/ (NUI icon). |
category |
Drives spoilage defaults and drink detection. |
grill / fryer |
Can be placed on that station. |
cookedItem |
The output when cooked. |
models |
Per-stage world models on the grill/fryer. |
propType |
spatula / basket etc. — hand prop + take-to-hand eligibility. |
hunger / thirst / consumeTime |
Consumption effects. |
spoilTime |
Per-item spoilage seconds (else Config.SpoilTimes[category]). |
fryerModifiers |
Ingredient-based alternate fryer outputs. |
2. Add the label
Add to shared/locales.lua:
item_my_burger = "My Burger",
3. Register with your inventory
Add the item to ox_inventory / qb-core and drop a my_burger.png image in the inventory's image folder. Regenerate the items/ lists (they're generated from config_items.lua) or add the entry by hand — see Inventory Items.
4. (Optional) Make it consumable
If it should be eaten/drunk, ensure it's useable in your inventory. The resource auto-registers consumables; you can also force it at runtime:
exports.aty_restaurant:RegisterDynamicConsumable('my_burger', 'general')
5. Add recipes
shared/config_recipes.lua:
- Grill/fryer cooking is driven by the item's
cookedItem+models+ cook times. - Microwave — add to
Config.MicrowaveRecipes(input → output, power/time, perfect window). - Drinks — add to the drink dispenser recipes.
- Menu templates — extend the restaurant preset tables (e.g. Burger Shot) so owners can one-click apply your items.
6. Images & NUI
Put the .webp icon in web/public/. If you add or restructure NUI, rebuild:
cd web && npm run build
Text and item/recipe config are read at runtime — most additions only need a `restart aty_restaurant`. Only NUI **source** changes need a rebuild.