mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-25 20:23:42 +01:00
Add more doc to custom recipes
This commit is contained in:
parent
bf616f5d21
commit
742627aa8c
3
API.md
3
API.md
@ -2,6 +2,9 @@
|
||||
|
||||
### Custom recipes
|
||||
|
||||
Custom recipes are nonconventional crafts outside the main crafting grid.
|
||||
They can be registered in-game dynamically and have a size beyond 3x3 items.
|
||||
|
||||
#### Registering a custom crafting type (example)
|
||||
|
||||
```Lua
|
||||
|
5
init.lua
5
init.lua
@ -59,7 +59,6 @@ craftguide.background = "craftguide_bg_full.png"
|
||||
|
||||
local PNG = {
|
||||
bg = "craftguide_bg.png",
|
||||
bg_full = craftguide.background,
|
||||
search = "craftguide_search_icon.png",
|
||||
clear = "craftguide_clear_icon.png",
|
||||
prev = "craftguide_next_icon.png^\\[transformFX",
|
||||
@ -580,12 +579,12 @@ local function make_formspec(name)
|
||||
|
||||
if not sfinv_only then
|
||||
fs[#fs + 1] = fmt([[
|
||||
size[%f,%f;]
|
||||
size[9.5,8.4]
|
||||
no_prepend[]
|
||||
bgcolor[#00000000;false]
|
||||
background[1,1;1,1;%s;true%s]
|
||||
]],
|
||||
9.5, 8.4, PNG.bg_full, DEV_CORE and ";10" or "")
|
||||
craftguide.background, DEV_CORE and ";10" or "")
|
||||
end
|
||||
|
||||
fs[#fs + 1] = fmt([[
|
||||
|
Loading…
Reference in New Issue
Block a user