wall.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. -- Node will be called <modname>wall_<subname>
  2. function stairsplus.register_wall(modname, subname, recipeitem, groups, images, description, drop, sounds, sunlight)
  3. --
  4. -- nodes
  5. --
  6. minetest.register_node(":".. modname .. ":wall_" .. subname, {
  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,
  16. node_box = {
  17. type = "fixed",
  18. fixed = {-0.5, -0.5, 0, 0.5, 0.5, 0.5},
  19. },
  20. sounds = sounds,
  21. })
  22. minetest.register_alias(modname .. ":slab_" .. subname .. "_wall", modname .. ":wall_" .. subname)
  23. --
  24. -- crafting
  25. --
  26. minetest.register_craft({
  27. output = modname .. ":wall_" .. subname .. " 6",
  28. recipe = {
  29. {recipeitem},
  30. {recipeitem},
  31. {recipeitem},
  32. },
  33. })
  34. minetest.register_craft({
  35. output = recipeitem,
  36. recipe = {
  37. {modname .. ":wall_" .. subname, modname .. ":wall_" .. subname},
  38. },
  39. })
  40. --
  41. -- cooking
  42. --
  43. minetest.register_craft({
  44. type = "cooking",
  45. output = modname .. ":wall_stone",
  46. recipe = modname .. ":wall_cobble",
  47. })
  48. end