summaryrefslogtreecommitdiff
path: root/moreblocks/stairsplus/API.md
blob: b5cb0c150e201a393af9a7cfdc68eab8e5418bb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# API documentation for Stairs+

* `stairsplus:register_all(modname, subname, recipeitem, fields)`
	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", "defaut:wood", {
		description = "Wooden",
		tiles = {"default_wood.png"},
		groups = {oddly_breakabe_by_hand=1},
		sounds = default.node_sound_wood_defaults(),
	})
	```
The following register only a particular type of microblock.
You will probably never want to use them directly:

* `stairsplus:register_stair(modname, subname, recipeitem, fields)`
* `stairsplus:register_slab(modname, subname, recipeitem, fields)`
* `stairsplus:register_panel(modname, subname, recipeitem, fields)`
* `stairsplus:register_micro(modname, subname, recipeitem, fields)`
* `stairsplus:register_slope(modname, subname, recipeitem, fields)`

If you only want to register a subset of stairsplus nodes,
you can use the `stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)` function.
The subset table should have the following format:

```lua
    local subset = {
    	{ "micro", "" },
    	{ "micro", "_1" },
    	{ "micro", "_2" },
    	{ "micro", "_4" },
    	{ "micro", "_12" },
    	{ "micro", "_14" },
    	{ "micro", "_15" },
    	{ "panel", "" },
    	{ "panel", "_1" },
    	{ "panel", "_2" },
    	{ "panel", "_4" },
    	{ "panel", "_12" },
    	{ "panel", "_14" },
    	{ "panel", "_15" },
    	{ "slab",  "" },
    	{ "slab",  "_quarter" },
    	{ "slab",  "_three_quarter" },
    	{ "slab",  "_1" },
    	{ "slab",  "_2" },
    	{ "slab",  "_14" },
    	{ "slab",  "_15" },
    	{ "slab",  "_two_sides" },
    	{ "slab",  "_three_sides" },
    	{ "slab",  "_three_sides_u" },
    	{ "slope", "" },
    	{ "slope", "_half" },
    	{ "slope", "_half_raised" },
    	{ "slope", "_inner" },
    	{ "slope", "_inner_half" },
    	{ "slope", "_inner_half_raised" },
    	{ "slope", "_inner_cut" },
    	{ "slope", "_inner_cut_half" },
    	{ "slope", "_inner_cut_half_raised" },
    	{ "slope", "_outer" },
    	{ "slope", "_outer_half" },
    	{ "slope", "_outer_half_raised" },
    	{ "slope", "_outer_cut" },
    	{ "slope", "_outer_cut_half" },
    	{ "slope", "_outer_cut_half_raised" },
    	{ "slope", "_cut" },
    	{ "stair", "" },
    	{ "stair", "_half" },
    	{ "stair", "_right_half" },
    	{ "stair", "_inner" },
    	{ "stair", "_outer" },
    	{ "stair", "_alt" },
    	{ "stair", "_alt_1" },
    	{ "stair", "_alt_2" },
    	{ "stair", "_alt_4" },
    }
```
You can remove entries as needed.