api.txt 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Stairs API
  2. ----------
  3. 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.
  4. `stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  5. * Registers a stair
  6. * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
  7. * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
  8. * `groups`: See [Known damage and digging time defining groups]
  9. * `images`: See [Tile definition]
  10. * `description`: Used for the description field in the stair's definition
  11. * `sounds`: See [#Default sounds]
  12. * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
  13. `stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  14. * Registers a slab
  15. * `subname`: Basically the material name (e.g. cobble) used for the slab name. Nodename pattern: "stairs:slab_subname"
  16. * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble"
  17. * `groups`: See [Known damage and digging time defining groups]
  18. * `images`: See [Tile definition]
  19. * `description`: Used for the description field in the slab's definition
  20. * `sounds`: See [#Default sounds]
  21. * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
  22. `stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  23. * Registers an inner corner stair
  24. * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname"
  25. * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
  26. * `groups`: See [Known damage and digging time defining groups]
  27. * `images`: See [Tile definition]
  28. * `description`: Used for the description field in the stair's definition with "Inner" prepended
  29. * `sounds`: See [#Default sounds]
  30. * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
  31. `stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  32. * Registers an outer corner stair
  33. * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname"
  34. * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
  35. * `groups`: See [Known damage and digging time defining groups]
  36. * `images`: See [Tile definition]
  37. * `description`: Used for the description field in the stair's definition with "Outer" prepended
  38. * `sounds`: See [#Default sounds]
  39. * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
  40. `stairs.register_slope(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  41. * Registers a slope
  42. * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname"
  43. * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
  44. * `groups`: See [Known damage and digging time defining groups]
  45. * `images`: See [Tile definition]
  46. * `description`: Used for the description field in the stair's definition with "Outer" prepended
  47. * `sounds`: See [#Default sounds]
  48. * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
  49. `stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)`
  50. * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer
  51. * Uses almost the same arguments as stairs.register_stair
  52. * `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed
  53. * `desc_slab`: Description for slab node
  54. `stairs.register_all(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  55. * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer, stairs.register_slope
  56. * Uses almost the same arguments as stairs.register_stair
  57. * `description`: Description for stair nodes. 'stair' 'slab' 'stair_inner' 'stair_outer' 'Slope' will be prefixed