Fix documentation of recipe registration

This commit is contained in:
octacian 2017-02-24 14:08:28 -08:00
parent 305e0ad8ba
commit f11fe2ff90

@ -10,7 +10,7 @@ __Single Recipe:__
```lua ```lua
microexpansion.register_recipe("default:steelblock", { microexpansion.register_recipe("default:steelblock", {
"single", "single",
{ { 1,
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
@ -18,25 +18,25 @@ microexpansion.register_recipe("default:steelblock", {
}) })
``` ```
The above registers a single recipe for the item specified. The above registers a single recipe for the item specified. The `1` specifies the output quantity.
__Multiple Recipes:__ __Multiple Recipes:__
```lua ```lua
microexpansion.register_recipe("default:steelblock", { microexpansion.register_recipe("default:steelblock", {
"multiple", "multiple",
{ { 1,
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
}, },
{ { 1,
{ "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot" },
{ "default:steel_ingot", "default:steel_ingot" }, { "default:steel_ingot", "default:steel_ingot" },
} }
}) })
``` ```
The above registers multiple recipes for the item specified. The above registers multiple recipes for the item specified. The `1` specifies the output quantity.
#### `register_item(itemstring, def)` #### `register_item(itemstring, def)`
__Usage:__ `microexpansion.register_item(<itemstring (string)>, <item definition (table)>` __Usage:__ `microexpansion.register_item(<itemstring (string)>, <item definition (table)>`