Update docs for stairs.register_stair_type().

This commit is contained in:
orbea 2020-04-09 00:01:28 -07:00
parent 5c2bcd1809
commit de529f6728

View file

@ -719,16 +719,24 @@ Stairs API
The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those
delivered with Minetest Game, to keep them compatible with other mods. delivered with Minetest Game, to keep them compatible with other mods.
`stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)` `stairs.register_stair_type(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description, stairtype)`
* Registers a stair * Registers a stair
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname" * `subname`: Basically the material name (e.g. cobble) used for the stair name.
Nodename pattern: "stairs:stair_subname", "stairs:stair_inner_subname", stairs:stair_outer_subname
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups] * `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition] * `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition * `description`: Used for the description field in the stair's definition
* `sounds`: See [#Default sounds] * `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
* Note: Only for inner and outer stairs.
* `stairtype`: Sets the type of stair, e.g. "inner" for inner corner stair and "outer" for outer corner stair, otherwise `nil`
`stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
* Deprecated, remove from mods.
`stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)` `stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
@ -743,27 +751,11 @@ delivered with Minetest Game, to keep them compatible with other mods.
`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)` `stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)`
* Registers an inner corner stair * Deprecated, remove from mods.
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition with "Inner" prepended
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)` `stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)`
* Registers an outer corner stair * Deprecated, remove from mods.
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition with "Outer" prepended
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)` `stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)`