1 # API documentation for Cups mod
2 This mod provides a simple API for adding more cups.
4 ## `cups.register_cup(subname, description, tiles, craftitem, craft_count, extra_groups, extra_sounds)`
5 Adds a new cup with itemstring `cups:cup_<subname>` and optionally a crafting recipe for this cup.
7 If `craftitem` is non-`nil`, the recipe follows this template:
16 Yields `craft_count` cups.
19 * `subname`: Part of the name which will be used to create the cup's itemstring
20 * `description`: In-game description/tooltip of the cup
22 * `craftitem`: The item source to be used in the crafting recipe. If `nil`, no crafting recipe will be generated
23 * `craft_count`: How many cups will be crafted at once (only has an effect if `craftitem ~= nil`)
24 * `extra_groups`: Table of additional groups to assign to this item (optional)
25 * `extra_sounds`: Table of additional sounds (`SimpleSoundSpec`) to assign to this item (optional)