api.txt 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_slope_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  50. `stairs.register_slope_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  51. `stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)`
  52. * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer
  53. * Uses almost the same arguments as stairs.register_stair
  54. * `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed
  55. * `desc_slab`: Description for slab node
  56. `stairs.register_all(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
  57. * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer, stairs.register_slope
  58. * Uses almost the same arguments as stairs.register_stair
  59. * `description`: Description for stair nodes. 'stair' 'slab' 'stair_inner' 'stair_outer' 'Slope' will be prefixed
  60. Note: if sounds set to nil then node sounds will be used. Texture alpha, sunglight propagates and light source will be taken from node for each stair registered.