railing.lua 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. minetest.register_node("plastic:railing_1", {
  2. description = "Plastic Railing",
  3. -- drawtype = "allfaces_optional",
  4. tiles = { "plastic_plastic_block.png" },
  5. paramtype = "light",
  6. groups = {cracky=2},
  7. sounds = default.node_sound_stone_defaults(),
  8. drawtype = "nodebox",
  9. node_box = {
  10. type = "fixed",
  11. fixed = {
  12. {-0.1, 0.3, -0.5, 0.1, 0.5, 0.5}, -- rail
  13. {-0.1, -0.5, -0.1, 0.1, 0.4, 0.1}, -- post
  14. },
  15. },
  16. selection_box = {
  17. type = "fixed",
  18. fixed = {
  19. {-0.1, -0.5, -0.5, 0.1, 0.5, 0.5}
  20. },
  21. },
  22. })
  23. minetest.register_node("plastic:railing_2", {
  24. description = "Plastic Railing",
  25. -- drawtype = "allfaces_optional",
  26. tiles = { "plastic_plastic_block.png" },
  27. paramtype = "light",
  28. groups = {cracky=2},
  29. sounds = default.node_sound_stone_defaults(),
  30. drawtype = "nodebox",
  31. node_box = {
  32. type = "fixed",
  33. fixed = {
  34. {-0.1, 0.3, -0.5, 0.1, 0.5, 0.5}, -- rail
  35. {-0.20, -0.5, -0.20, 0.25, 0.4, 0.25}, -- posts, all fucked up, no time to fiddle
  36. {-0.50, -0.5, -0.50, 0.55, 0.4, 0.55}, -- posts
  37. {-0.70, -0.5, -0.70, 0.75, 0.4, 0.75}, -- posts
  38. },
  39. },
  40. selection_box = {
  41. type = "fixed",
  42. fixed = {
  43. {-0.1, -0.5, -0.5, 0.1, 0.5, 0.5}
  44. },
  45. },
  46. })
  47. minetest.register_craft( {
  48. output = "plastic:railing_1",
  49. recipe = {
  50. { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
  51. { "", "homedecor:plastic_sheeting", "" },
  52. { "", "homedecor:plastic_sheeting", "" },
  53. },
  54. })
  55. minetest.register_craft( {
  56. output = "plastic:railing_2",
  57. recipe = {
  58. { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
  59. { "homedecor:plastic_sheeting", "", "homedecor:plastic_sheeting"},
  60. { "homedecor:plastic_sheeting", "", "homedecor:plastic_sheeting"},
  61. },
  62. })