quater_wall.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. -- Node will be called <modname>wall_<subname>
  2. function stairsplus.register_quater_wall(modname, subname, recipeitem, groups, images, description, drop, sounds, sunlight)
  3. --
  4. -- nodes
  5. --
  6. minetest.register_node(":".. modname .. ":wall_" .. subname .. "_quarter", {
  7. description = description,
  8. drawtype = "nodebox",
  9. tiles = images,
  10. paramtype = "light",
  11. paramtype2 = "facedir",
  12. is_ground_content = false,
  13. sunlight_propagates = sunlight,
  14. groups = groups,
  15. drop = modname .. ":wall_" .. drop .. "_quarter",
  16. node_box = {
  17. type = "fixed",
  18. fixed = {-0.5, -0.5, 0.25, 0.5, 0.5, 0.5},
  19. },
  20. sounds = sounds,
  21. })
  22. minetest.register_alias(modname .. ":slab_" .. subname .. "_quarter_wall", modname .. ":wall_" .. subname .. "_quarter")
  23. minetest.register_node(":".. modname .. ":wall_" .. subname .. "_three_quarter", {
  24. description = description,
  25. drawtype = "nodebox",
  26. tiles = images,
  27. paramtype = "light",
  28. paramtype2 = "facedir",
  29. is_ground_content = false,
  30. sunlight_propagates = sunlight,
  31. groups = groups,
  32. drop = modname .. ":wall_" .. drop .. "_three_quarter",
  33. node_box = {
  34. type = "fixed",
  35. fixed = {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  36. },
  37. sounds = sounds,
  38. })
  39. minetest.register_alias(modname .. ":slab_" .. subname .. "_three_quarter_wall", modname .. ":wall_" .. subname .. "_three_quarter")
  40. --
  41. -- crafting
  42. --
  43. minetest.register_craft({
  44. output = modname .. ":wall_" .. subname .. "_quarter 6",
  45. recipe = {
  46. {modname .. ":wall_" .. subname},
  47. {modname .. ":wall_" .. subname},
  48. {modname .. ":wall_" .. subname},
  49. },
  50. })
  51. minetest.register_craft({
  52. output = modname .. ":wall_" .. subname .. "_three_quarter 1",
  53. recipe = {
  54. {modname .. ":wall_" .. subname .. "_quarter", modname .. ":wall_" .. subname .. "_quarter", modname .. ":wall_" .. subname .. "_quarter"},
  55. },
  56. })
  57. --
  58. -- cooking
  59. --
  60. minetest.register_craft({
  61. type = "cooking",
  62. output = modname .. ":wall_stone_quarter",
  63. recipe = modname .. ":wall_cobble_quarter",
  64. })
  65. minetest.register_craft({
  66. type = "cooking",
  67. output = modname .. ":wall_stone_three_quarter",
  68. recipe = modname .. ":wall_cobble_three_quarter",
  69. })
  70. end