Repository for the mercury_element mod.
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.

init.lua 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. --Solid Nodes
  2. minetest.register_node("mercury_element:stone_with_cinnabar", {
  3. description = "Cinnabar Ore",
  4. tiles = {"default_stone.png^mercury_element_mineral_cinnabar.png"},
  5. is_ground_content = true,
  6. drop = "mercury_element:cinnabar_gem 1",
  7. groups = {cracky=3}
  8. })
  9. minetest.register_node("mercury_element:cinnabar_block", {
  10. description = "Cinnabar Block",
  11. tiles = {"mercury_element_cinnabar_block.png"},
  12. is_ground_content = false,
  13. groups = {cracky=3}
  14. })
  15. minetest.register_node("mercury_element:chiseled_cinnabar", {
  16. description = "Chiseled Cinnabar",
  17. tiles = {"mercury_element_chiseled_cinnabar.png"},
  18. is_ground_content = false,
  19. groups = {cracky=3}
  20. })
  21. stairs.register_stair_and_slab(
  22. "cinnabar",
  23. "mercury_element:cinnabar_block",
  24. {cracky=3},
  25. {"mercury_element_cinnabar_block.png"},
  26. "Cinnabar Block Stair",
  27. "Cinnabar Block Slab"
  28. --default.node_sound_wood_defaults()
  29. )
  30. --Liquid Nodes
  31. minetest.register_node("mercury_element:mercury_source", {
  32. description = "Mercury Source",
  33. drawtype = "liquid",
  34. tiles = {
  35. {
  36. name = "mercury_element_mercury_source_animated.png",
  37. animation = {
  38. type = "vertical_frames",
  39. aspect_w = 16,
  40. aspect_h = 16,
  41. length = 2.0,
  42. },
  43. },
  44. },
  45. special_tiles = {
  46. {
  47. name = "mercury_element_mercury_source_animated.png",
  48. animation = {
  49. type = "vertical_frames",
  50. aspect_w = 16,
  51. aspect_h = 16,
  52. length = 2.0,
  53. },
  54. backface_culling = false,
  55. },
  56. },
  57. paramtype = "light",
  58. walkable = false,
  59. pointable = false,
  60. diggable = false,
  61. buildable_to = true,
  62. is_ground_content = false,
  63. drop = "",
  64. drowning = 1,
  65. liquidtype = "source",
  66. liquid_alternative_flowing = "mercury_element:mercury_flowing",
  67. liquid_alternative_source = "mercury_element:mercury_source",
  68. liquid_viscosity = 1,
  69. liquid_renewable = false,
  70. damage_per_second = 4 * 2,
  71. post_effect_color = {a = 191, r = 219, g = 206, b = 202},
  72. groups = {liquid = 3, puts_out_fire = 1},
  73. --sounds = default.node_sound_water_defaults(),
  74. })
  75. minetest.register_node("mercury_element:mercury_flowing", {
  76. description = "Flowing Mercury",
  77. drawtype = "flowingliquid",
  78. tiles = {"mercury_element_mercury.png"},
  79. special_tiles = {
  80. {
  81. name = "mercury_element_mercury_flowing_animated.png",
  82. backface_culling = false,
  83. animation = {
  84. type = "vertical_frames",
  85. aspect_w = 16,
  86. aspect_h = 16,
  87. length = 0.8,
  88. },
  89. },
  90. {
  91. name = "mercury_element_mercury_flowing_animated.png",
  92. backface_culling = true,
  93. animation = {
  94. type = "vertical_frames",
  95. aspect_w = 16,
  96. aspect_h = 16,
  97. length = 0.8,
  98. },
  99. },
  100. },
  101. paramtype = "light",
  102. paramtype2 = "flowingliquid",
  103. walkable = false,
  104. pointable = false,
  105. diggable = false,
  106. buildable_to = true,
  107. is_ground_content = false,
  108. drop = "",
  109. drowning = 1,
  110. liquidtype = "flowing",
  111. liquid_alternative_flowing = "mercury_element:mercury_flowing",
  112. liquid_alternative_source = "mercury_element:mercury_source",
  113. liquid_viscosity = 1,
  114. liquid_renewable = false,
  115. damage_per_second = 4 * 2,
  116. post_effect_color = {a = 191, r = 219, g = 206, b = 202},
  117. groups = {liquid = 3, puts_out_fire = 1,
  118. not_in_creative_inventory = 1},
  119. --sounds = default.node_sound_water_defaults(),
  120. })
  121. --Items
  122. minetest.register_craftitem("mercury_element:cinnabar_gem", {
  123. description = "Cinnabar Gem",
  124. inventory_image = "mercury_element_cinnabar_gem.png"
  125. })
  126. minetest.register_craftitem("mercury_element:cinnabar_powder", {
  127. description = "Cinnabar Powder",
  128. inventory_image = "mercury_element_cinnabar_powder.png"
  129. })
  130. minetest.register_craftitem("mercury_element:bucket_cinnabar_powder", {
  131. description = "Cinnabar Powder in a Bucket",
  132. inventory_image = "mercury_element_bucket_cinnabar_powder.png",
  133. stack_max = 1
  134. })
  135. bucket.register_liquid(
  136. "mercury_element:mercury_source",
  137. "mercury_element:mercury_flowing",
  138. "mercury_element:bucket_mercury",
  139. "mercury_element_bucket_mercury.png",
  140. "Mercury Bucket"
  141. )
  142. --Ores
  143. --Cinnabar ore
  144. minetest.register_ore({
  145. ore_type = "scatter",
  146. ore = "mercury_element:stone_with_cinnabar",
  147. wherein = "default:stone",
  148. clust_scarcity = 14 * 14 * 14,
  149. clust_num_ores = 5,
  150. clust_size = 3,
  151. y_min = 1025,
  152. y_max = 31000,
  153. })
  154. minetest.register_ore({
  155. ore_type = "scatter",
  156. ore = "mercury_element:stone_with_cinnabar",
  157. wherein = "default:stone",
  158. clust_scarcity = 18 * 18 * 18,
  159. clust_num_ores = 3,
  160. clust_size = 2,
  161. y_min = -255,
  162. y_max = -64,
  163. })
  164. minetest.register_ore({
  165. ore_type = "scatter",
  166. ore = "mercury_element:stone_with_cinnabar",
  167. wherein = "default:stone",
  168. clust_scarcity = 14 * 14 * 14,
  169. clust_num_ores = 5,
  170. clust_size = 3,
  171. y_min = -31000,
  172. y_max = -256,
  173. })
  174. --Crafting Recipes
  175. minetest.register_craft({
  176. type = "shaped",
  177. output = "mercury_element:cinnabar_block 1",
  178. recipe = {
  179. {"mercury_element:cinnabar_gem", "mercury_element:cinnabar_gem", "mercury_element:cinnabar_gem"},
  180. {"mercury_element:cinnabar_gem", "mercury_element:cinnabar_gem", "mercury_element:cinnabar_gem"},
  181. {"mercury_element:cinnabar_gem", "mercury_element:cinnabar_gem", "mercury_element:cinnabar_gem"}
  182. }
  183. })
  184. minetest.register_craft({
  185. type = "shapeless",
  186. output = "mercury_element:cinnabar_gem 9",
  187. recipe = {
  188. "mercury_element:cinnabar_block"
  189. }
  190. })
  191. minetest.register_craft({
  192. type = "shapeless",
  193. output = "mercury_element:cinnabar_powder 9",
  194. recipe = {
  195. "mercury_element:cinnabar_gem"
  196. }
  197. })
  198. minetest.register_craft({
  199. type = "shaped",
  200. output = "mercury_element:cinnabar_gem 1",
  201. recipe = {
  202. {"mercury_element:cinnabar_powder", "mercury_element:cinnabar_powder", "mercury_element:cinnabar_powder"},
  203. {"mercury_element:cinnabar_powder", "mercury_element:cinnabar_powder", "mercury_element:cinnabar_powder"},
  204. {"mercury_element:cinnabar_powder", "mercury_element:cinnabar_powder", "mercury_element:cinnabar_powder"}
  205. }
  206. })
  207. minetest.register_craft({
  208. type = "shapeless",
  209. output = "mercury_element:bucket_cinnabar_powder",
  210. recipe = {
  211. "mercury_element:cinnabar_powder",
  212. "bucket:bucket_empty"
  213. }
  214. })
  215. minetest.register_craft({
  216. type = "cooking",
  217. output = "mercury_element:bucket_mercury",
  218. recipe = "mercury_element:bucket_cinnabar_powder",
  219. --cooktime = 10,
  220. })
  221. minetest.register_craft({
  222. type = "shapeless",
  223. output = "mercury_element:chiseled_cinnabar",
  224. recipe = {
  225. "stairs:slab_cinnabar",
  226. "stairs:slab_cinnabar"
  227. }
  228. })