Exports
The framework registers stations, recipes and ingredients through exports, so you can add your own without touching either resource.
Registering content
exports['hz_cook']:RegisterStation({ id = 'my_grill', prop = 'my_prop', ... })
exports['hz_cook']:RegisterRecipe({ id = 'my_dish', stationTags = { 'grill' }, ... })
exports['hz_cook']:RegisterIngredients({ my_meat = { label = 'Meat', ... } })
exports['hz_cook']:AddLocale('fr', { ingr_my_meat = 'Viande' })
Register again on every framework start
The registry lives in HZ-Cook's Lua state. A
restart hz_cook clears it, and everything registered from another resource disappears with it.Listen for the announcement and register again:
AddEventHandler('hz-cook:content', registerEverything)
This is exactly how hz_cook_bbq re-registers itself, and it is why the barbecue stations come back on their own after a framework restart.
Station tags rather than ids
A recipe that targets stationTags = { 'grill' } rather than a station id will also work on any station a future pack tags as a grill.
That is deliberate: it lets content packs compose. A recipe written today for the barbecue will run on a grill shipped by a pack that does not exist yet, with no change on either side.
