param2.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. -- This file is for misc. param2 tests that aren't covered in drawtypes.lua already.
  2. local S = minetest.get_translator("testnodes")
  3. minetest.register_node("testnodes:facedir", {
  4. description = S("Facedir Test Node"),
  5. paramtype2 = "facedir",
  6. tiles = {
  7. "testnodes_1.png",
  8. "testnodes_2.png",
  9. "testnodes_3.png",
  10. "testnodes_4.png",
  11. "testnodes_5.png",
  12. "testnodes_6.png",
  13. },
  14. groups = { dig_immediate = 3 },
  15. })
  16. minetest.register_node("testnodes:facedir_nodebox", {
  17. description = S("Facedir Nodebox Test Node"),
  18. tiles = {
  19. "testnodes_1.png",
  20. "testnodes_2.png",
  21. "testnodes_3.png",
  22. "testnodes_4.png",
  23. "testnodes_5.png",
  24. "testnodes_6.png",
  25. },
  26. drawtype = "nodebox",
  27. paramtype = "light",
  28. paramtype2 = "facedir",
  29. node_box = {
  30. type = "fixed",
  31. fixed = {-0.5, -0.5, -0.5, 0.2, 0.2, 0.2},
  32. },
  33. groups = {dig_immediate=3},
  34. })
  35. minetest.register_node("testnodes:wallmounted", {
  36. description = S("Wallmounted Test Node"),
  37. paramtype2 = "wallmounted",
  38. tiles = {
  39. "testnodes_1w.png",
  40. "testnodes_2w.png",
  41. "testnodes_3w.png",
  42. "testnodes_4w.png",
  43. "testnodes_5w.png",
  44. "testnodes_6w.png",
  45. },
  46. groups = { dig_immediate = 3 },
  47. })
  48. minetest.register_node("testnodes:wallmounted_nodebox", {
  49. description = S("Wallmounted Nodebox Test Node"),
  50. paramtype2 = "wallmounted",
  51. paramtype = "light",
  52. tiles = {
  53. "testnodes_1w.png",
  54. "testnodes_2w.png",
  55. "testnodes_3w.png",
  56. "testnodes_4w.png",
  57. "testnodes_5w.png",
  58. "testnodes_6w.png",
  59. },
  60. drawtype = "nodebox",
  61. node_box = {
  62. type = "wallmounted",
  63. wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 },
  64. wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
  65. wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 },
  66. },
  67. groups = { dig_immediate = 3 },
  68. })
  69. minetest.register_node("testnodes:color", {
  70. description = S("Color Test Node"),
  71. paramtype2 = "color",
  72. palette = "testnodes_palette_full.png",
  73. tiles = {
  74. "testnodes_node.png",
  75. },
  76. groups = { dig_immediate = 3 },
  77. })
  78. minetest.register_node("testnodes:colorfacedir", {
  79. description = S("Color Facedir Test Node"),
  80. paramtype2 = "colorfacedir",
  81. palette = "testnodes_palette_facedir.png",
  82. tiles = {
  83. "testnodes_1g.png",
  84. "testnodes_2g.png",
  85. "testnodes_3g.png",
  86. "testnodes_4g.png",
  87. "testnodes_5g.png",
  88. "testnodes_6g.png",
  89. },
  90. groups = { dig_immediate = 3 },
  91. })
  92. minetest.register_node("testnodes:colorfacedir_nodebox", {
  93. description = S("Color Facedir Nodebox Test Node"),
  94. tiles = {
  95. "testnodes_1g.png",
  96. "testnodes_2g.png",
  97. "testnodes_3g.png",
  98. "testnodes_4g.png",
  99. "testnodes_5g.png",
  100. "testnodes_6g.png",
  101. },
  102. drawtype = "nodebox",
  103. paramtype = "light",
  104. paramtype2 = "colorfacedir",
  105. palette = "testnodes_palette_facedir.png",
  106. node_box = {
  107. type = "fixed",
  108. fixed = {-0.5, -0.5, -0.5, 0.2, 0.2, 0.2},
  109. },
  110. groups = {dig_immediate=3},
  111. })
  112. minetest.register_node("testnodes:colorwallmounted", {
  113. description = S("Color Wallmounted Test Node"),
  114. paramtype2 = "colorwallmounted",
  115. paramtype = "light",
  116. palette = "testnodes_palette_wallmounted.png",
  117. tiles = {
  118. "testnodes_1wg.png",
  119. "testnodes_2wg.png",
  120. "testnodes_3wg.png",
  121. "testnodes_4wg.png",
  122. "testnodes_5wg.png",
  123. "testnodes_6wg.png",
  124. },
  125. groups = { dig_immediate = 3 },
  126. })
  127. minetest.register_node("testnodes:colorwallmounted_nodebox", {
  128. description = S("Color Wallmounted Nodebox Test Node"),
  129. paramtype2 = "colorwallmounted",
  130. paramtype = "light",
  131. palette = "testnodes_palette_wallmounted.png",
  132. tiles = {
  133. "testnodes_1wg.png",
  134. "testnodes_2wg.png",
  135. "testnodes_3wg.png",
  136. "testnodes_4wg.png",
  137. "testnodes_5wg.png",
  138. "testnodes_6wg.png",
  139. },
  140. drawtype = "nodebox",
  141. node_box = {
  142. type = "wallmounted",
  143. wall_top = { -0.5, 0, -0.5, 0.5, 0.5, 0.5 },
  144. wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 },
  145. wall_side = { -0.5, -0.5, -0.5, 0, 0.5, 0.5 },
  146. },
  147. groups = { dig_immediate = 3 },
  148. })