nodes.lua 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. minetest.register_node("contamination:contaminated_dirt_with_grass", {
  2. description = "Contaminated Topsoil",
  3. drawtype="normal",
  4. drop="contamination:contaminated_dirt",
  5. tiles={
  6. "contaminated_grass_t.png",
  7. "contaminated_dirt.png",
  8. "contaminated_grass_s.png",
  9. "contaminated_grass_s.png",
  10. "contaminated_grass_s.png",
  11. "contaminated_grass_s.png"
  12. },
  13. groups = {crumbly=1,oddly_breakable_by_hand=1,contaminated=1},
  14. sounds = default.node_sound_dirt_defaults(),
  15. })
  16. minetest.register_node("contamination:contaminated_dirt", {
  17. description = "Contaminated Soil",
  18. drawtype="normal",
  19. tiles={
  20. "contaminated_dirt.png"
  21. },
  22. groups = {crumbly=1,oddly_breakable_by_hand=1,contaminated=1},
  23. sounds = default.node_sound_dirt_defaults(),
  24. })
  25. minetest.register_node("contamination:contaminated_water_source", {
  26. description = "Toxic Sludge Source",
  27. drawtype = "liquid",
  28. tiles = {"contaminated_water.png"},
  29. special_tiles = {"contaminated_water.png"},
  30. alpha = 160,
  31. paramtype = "light",
  32. walkable = false,
  33. pointable = false,
  34. diggable = false,
  35. is_ground_content = false,
  36. drop = "",
  37. damage_per_second=4,
  38. drowning = 1,
  39. liquidtype = "source",
  40. liquid_alternative_flowing = "contamination:contaminated_water_flowing",
  41. liquid_alternative_source = "contamination:contaminated_water_source",
  42. liquid_viscosity = 4,
  43. post_effect_color = {a = 200, r = 60, g = 90, b = 30},
  44. groups = {liquid = 1,contaminated=1},
  45. sounds = default.node_sound_water_defaults(),
  46. })
  47. minetest.register_node("contamination:contaminated_water_flowing", {
  48. drawtype = "flowingliquid",
  49. tiles = {"contaminated_water.png"},
  50. special_tiles = {"contaminated_water.png","contaminated_water.png"},
  51. alpha = 160,
  52. paramtype = "light",
  53. paramtype2 = "flowingliquid",
  54. walkable = false,
  55. pointable = false,
  56. diggable = false,
  57. is_ground_content = false,
  58. drop = "",
  59. damage_per_second=4,
  60. drowning = 1,
  61. liquidtype = "flowing",
  62. liquid_alternative_flowing = "contamination:contaminated_water_flowing",
  63. liquid_alternative_source = "contamination:contaminated_water_source",
  64. liquid_viscosity = 4,
  65. post_effect_color = {a = 200, r = 60, g = 90, b = 30},
  66. groups = {liquid = 1,not_in_creative_inventory=1,contaminated=1},
  67. sounds = default.node_sound_water_defaults(),
  68. })
  69. minetest.register_node("contamination:contaminated_sand", {
  70. description = "Contaminated Sands",
  71. drawtype="normal",
  72. tiles={
  73. "contaminated_sand.png"
  74. },
  75. groups = {crumbly=1,contaminated=1,oddly_breakable_by_hand=1,falling_node=1},
  76. sounds = default.node_sound_dirt_defaults(),
  77. })
  78. minetest.register_node("contamination:contaminated_stone", {
  79. description = "Contaminated Stone",
  80. drawtype="normal",
  81. tiles={
  82. "contaminated_stone.png"
  83. },
  84. drop="contamination:contaminated_cobble",
  85. groups = {cracky=1,contaminated=1},
  86. sounds = default.node_sound_stone_defaults(),
  87. })
  88. minetest.register_node("contamination:stone_with_rust", {
  89. description = "Rusty Stone",
  90. drawtype="normal",
  91. tiles={
  92. "contaminated_stone_rust.png"
  93. },
  94. groups = {choppy=2,contaminated=1},
  95. sounds = default.node_sound_stone_defaults(),
  96. })
  97. minetest.register_node("contamination:stone_with_lye", {
  98. description = "Lye Stone",
  99. drawtype="normal",
  100. tiles={
  101. "contaminated_stone_lye.png"
  102. },
  103. drop="contamination:lye",
  104. groups = {cracky=1,contaminated=1},
  105. sounds = default.node_sound_stone_defaults(),
  106. })
  107. minetest.register_node("contamination:stone_with_black_diamond", {
  108. description = "Black Diamond Ore",
  109. drawtype="normal",
  110. tiles={
  111. "contaminated_stone_bdiamond.png"
  112. },
  113. drop="contamination:black_diamond",
  114. groups = {cracky=1,contaminated=1},
  115. sounds = default.node_sound_stone_defaults(),
  116. })
  117. minetest.register_node("contamination:contaminated_cobble", {
  118. description = "Contaminated Cobblestone",
  119. drawtype="normal",
  120. tiles={
  121. "contaminated_cobble.png"
  122. },
  123. groups = {cracky=1,contaminated=1},
  124. sounds = default.node_sound_stone_defaults(),
  125. })
  126. minetest.register_node("contamination:contaminated_tree", {
  127. description = "Contaminated Tree",
  128. drawtype="normal",
  129. paramtype2 = "facedir",
  130. tiles={
  131. "contaminated_tree_top.png", "contaminated_tree_top.png", "contaminated_tree.png", "contaminated_tree.png", "contaminated_tree.png", "contaminated_tree.png"
  132. },
  133. groups = {choppy=1,oddly_breakable_by_hand=1,contaminated=1},
  134. sounds = default.node_sound_wood_defaults(),
  135. on_place = minetest.rotate_node
  136. })
  137. minetest.register_node("contamination:contaminated_wood", {
  138. description = "Contaminated Planks",
  139. drawtype="normal",
  140. tiles={
  141. "contaminated_wood.png"
  142. },
  143. groups = {choppy=1,oddly_breakable_by_hand=1,contaminated=1},
  144. sounds = default.node_sound_wood_defaults(),
  145. })
  146. minetest.register_node("contamination:contaminated_leaves", {
  147. description = "Contaminated Leaves",
  148. drawtype = "allfaces_optional",
  149. paramtype="light",
  150. sunlight_propagates=false,
  151. tiles={
  152. "contaminated_leaves.png"
  153. },
  154. drop="",
  155. groups = {snappy=2,oddly_breakable_by_hand=2,contaminated=1},
  156. sounds = default.node_sound_leaves_defaults(),
  157. })
  158. minetest.register_abm({
  159. nodenames = "contamination:contaminated_leaves",
  160. interval=10,
  161. chance=4,
  162. action=function(p)
  163. minetest.remove_node(p)
  164. end
  165. })
  166. minetest.register_node("contamination:contaminated_sticks", {
  167. description = "Contaminated Plant Remains",
  168. drawtype="plantlike",
  169. paramtype="light",
  170. inventory_image="contaminated_sticks.png",
  171. sunlight_propagates=true,
  172. buildable_to=true,
  173. damage_per_second = 2,
  174. selection_box={type="fixed", fixed={-0.5,-0.5,-0.5,0.5,-0.25,0.5}},
  175. walkable=false,
  176. tiles={
  177. "contaminated_sticks.png"
  178. },
  179. drop="",
  180. groups = {snappy=1,attached_node = 1,contaminated=1,oddly_breakable_by_hand=1},
  181. sounds = default.node_sound_leaves_defaults(),
  182. })
  183. minetest.register_node("contamination:contaminated_mushroom", {
  184. description = "Contaminated Mushroom",
  185. drawtype="plantlike",
  186. paramtype="light",
  187. inventory_image="contaminated_mushroom.png",
  188. sunlight_propagates=true,
  189. buildable_to=true,
  190. damage_per_second = 4,
  191. selection_box={type="fixed", fixed={-0.5,-0.5,-0.5,0.5,-0.25,0.5}},
  192. walkable=false,
  193. tiles={
  194. "contaminated_mushroom.png"
  195. },
  196. on_use = function(itemstack, player)
  197. itemstack:take_item()
  198. minetest.after(10,
  199. function(player)
  200. if player and player:is_player() then
  201. player:set_hp(0)
  202. end
  203. end, player)
  204. return itemstack
  205. end,
  206. groups = {contaminated=1,attached_node = 1,oddly_breakable_by_hand=1},
  207. sounds = default.node_sound_leaves_defaults(),
  208. })
  209. minetest.register_node("contamination:catalyst", {
  210. description = "Contaminated Specimen",
  211. drawtype="normal",
  212. tiles={
  213. "contamination_block.png"
  214. },
  215. drop="contamination:catalyst",
  216. groups = {cracky=1,oddly_breakable_by_hand=1,contaminated=1},
  217. sounds = default.node_sound_metal_defaults(),
  218. })
  219. minetest.register_node("contamination:black_diamond_block", {
  220. description = "Carbonado Block",
  221. drawtype="normal",
  222. tiles={
  223. "contam_bdiamond_block.png"
  224. },
  225. groups = {cracky=1,oddly_breakable_by_hand=1,contaminated=1},
  226. sounds = default.node_sound_metal_defaults(),
  227. })