Minetest mod that adds scifi themed nodes https://content.minetest.net/packages/D00Med/scifi_nodes/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

112 lines
3.0 KiB

  1. local function register(basename, description, texture)
  2. local nodename_single = "scifi_nodes:" .. basename .. "_pane"
  3. local nodename_double = "scifi_nodes:" .. basename .. "_pane_double"
  4. local nodename_offset = "scifi_nodes:" .. basename .. "_pane_offset"
  5. local recipe_ingredient = "scifi_nodes:" .. basename
  6. -- single height
  7. minetest.register_node(nodename_single, {
  8. description = description,
  9. drawtype = "nodebox",
  10. tiles = {
  11. texture
  12. },
  13. wield_image = texture,
  14. paramtype = "light",
  15. paramtype2 = "facedir",
  16. sunlight_propagates = true,
  17. is_ground_content = false,
  18. node_box = {
  19. type = "fixed",
  20. fixed = {{-0.5, -0.5, -0.03125, 0.5, 0.5, 0.03125}},
  21. },
  22. selection_box = {
  23. type = "fixed",
  24. fixed = {{-0.5, -0.5, -0.25, 0.5, 0.5, 0.25}},
  25. },
  26. groups = {cracky = 3, oddly_breakable_by_hand = 3},
  27. use_texture_alpha = true,
  28. sounds = default.node_sound_glass_defaults()
  29. })
  30. -- double height
  31. minetest.register_node(nodename_double, {
  32. description = description,
  33. drawtype = "nodebox",
  34. tiles = {
  35. texture
  36. },
  37. wield_image = texture,
  38. paramtype = "light",
  39. paramtype2 = "facedir",
  40. sunlight_propagates = true,
  41. is_ground_content = false,
  42. node_box = {
  43. type = "fixed",
  44. fixed = {{-0.5, -0.5, -0.03125, 0.5, 1.5, 0.03125}},
  45. },
  46. selection_box = {
  47. type = "fixed",
  48. fixed = {{-0.5, -0.5, -0.25, 0.5, 1.5, 0.25}},
  49. },
  50. groups = {cracky = 3, oddly_breakable_by_hand = 3},
  51. use_texture_alpha = true,
  52. sounds = default.node_sound_glass_defaults()
  53. })
  54. -- single height with offset
  55. minetest.register_node(nodename_offset, {
  56. description = description,
  57. drawtype = "nodebox",
  58. tiles = {
  59. texture
  60. },
  61. wield_image = texture,
  62. paramtype = "light",
  63. paramtype2 = "facedir",
  64. sunlight_propagates = true,
  65. is_ground_content = false,
  66. node_box = {
  67. type = "fixed",
  68. fixed = {{-0.5, -0.5, 0.96875, 0.5, 0.5, 1.03125}},
  69. },
  70. selection_box = {
  71. type = "fixed",
  72. fixed = {{-0.5, -0.5, 0.75, 0.5, 0.5, 1.25}},
  73. },
  74. groups = {cracky = 3, oddly_breakable_by_hand = 3},
  75. use_texture_alpha = true,
  76. sounds = default.node_sound_glass_defaults()
  77. })
  78. -- register recipes
  79. minetest.register_craft({
  80. output = nodename_single .. " 16",
  81. recipe = {
  82. {recipe_ingredient}
  83. },
  84. })
  85. minetest.register_craft({
  86. output = nodename_double .. " 16",
  87. recipe = {
  88. {recipe_ingredient},
  89. {recipe_ingredient}
  90. },
  91. })
  92. minetest.register_craft({
  93. output = nodename_offset,
  94. type = "shapeless",
  95. recipe = {nodename_single},
  96. })
  97. end
  98. register("octrng", "Orange Octagon Glass pane", "scifi_nodes_octrng.png")
  99. register("octgrn", "Green Octagon Glass pane", "scifi_nodes_octgrn.png")
  100. register("octbl", "Blue Octagon Glass pane", "scifi_nodes_octbl.png")
  101. register("octppl", "Purple Octagon Glass pane", "scifi_nodes_octppl.png")
  102. register("glass", "Dark Glass pane", "scifi_nodes_glass.png")