moreblocks/stairsplus/API.md

49 lines
1.1 KiB
Markdown
Raw Normal View History

2017-02-19 13:35:16 +01:00
# API documentation for Stairs+
2014-03-09 10:38:18 +01:00
TODO: write new API docs
2022-06-17 02:46:09 +02:00
api.register_craft_schema({
output = "panel_8 6",
recipe = {{"node", "node", "node"}},
})
api.register_craft_schema({
type = "shapeless",
output = "micro_8 7",
recipe = {"stair_inner"},
})
api.register_schema_crafts_for_node("default:coalblock")
api.register_crafts_for_shapes({
type = "cooking",
output = "default:stone",
recipe = "default:cobblestone",
cooktime = function(eights) return 3 * eights / 8 end,
})
api.register_crafts_for_shapes({
type = "fuel",
recipe = "default:coalblock",
burntime = function(eights) return 370 * eights / 8 end,
})
# legacy API
2014-03-09 10:38:18 +01:00
* `stairsplus:register_all(modname, subname, recipeitem, fields)`
2022-06-12 03:17:41 +02:00
Registers a stair, slab, panel, microblock, and any other types of
nodes to be added in the future.
This also registers the node with the circular saw.
Example:
```lua
stairsplus:register_all("moreblocks", "wood", "default:wood", {
description = "Wooden",
tiles = {"default_wood.png"},
groups = {oddly_breakabe_by_hand=1},
sounds = moreblocks.node_sound_wood_defaults(),
})
```
need to also support legacy aliasing