added usage
This commit is contained in:
parent
44d9b251f2
commit
27a2985bc8
30
README.md
30
README.md
@ -5,4 +5,32 @@ Grafitti API for Minetest
|
|||||||
|
|
||||||
Code licensed as GPLv3 (see file LICENSE)
|
Code licensed as GPLv3 (see file LICENSE)
|
||||||
|
|
||||||
Screenshot:
|
Usage:
|
||||||
|
|
||||||
|
grafitti.register_grafitti(node_name, def)
|
||||||
|
-- node_name (eg. "default:stone")
|
||||||
|
-- def : {
|
||||||
|
-- image,
|
||||||
|
-- size = {x, y}, (optional, default: {1, 1})
|
||||||
|
-- center = {row, col}, (optional, default: {0, 0})
|
||||||
|
-- pointable (optional, default: false)
|
||||||
|
-- }
|
||||||
|
|
||||||
|
grafitti.set_palette_width(width)
|
||||||
|
-- Set GUI width for palette. If not set, default width is 8.
|
||||||
|
-- Use before palette build.
|
||||||
|
|
||||||
|
grafitti.palette_build(palette_name)
|
||||||
|
-- Place all previously registered grafitti into palette.
|
||||||
|
-- palette_name (eg. "mymod:nyancat_images")
|
||||||
|
|
||||||
|
grafitti.register_brush(brush_name, def)
|
||||||
|
-- Use after palette_build.
|
||||||
|
-- brush_name (eg. "mymod:nyancat_brush")
|
||||||
|
-- def : {
|
||||||
|
-- palette (eg. "mymod:nyancat_images"),
|
||||||
|
-- description (optional),
|
||||||
|
-- inventory_image (optional),
|
||||||
|
-- wield_image (optional),
|
||||||
|
-- recipe (optional)
|
||||||
|
-- }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user