nodes.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. local function get_node_drops(fullRockNode, cobbleRockNode)
  2. return {
  3. max_items = 1,
  4. items = {
  5. {
  6. -- drop the cobble variant with 1/3 chance
  7. items = {cobbleRockNode},
  8. rarity = 3,
  9. },
  10. {
  11. -- drop the full node with 2/3 chance
  12. items = {fullRockNode},
  13. }
  14. }
  15. }
  16. end
  17. ----------
  18. -- Nodes
  19. ----------
  20. --[[
  21. Basalt
  22. ]]
  23. minetest.register_node("darkage:basalt", {
  24. description = "Basalt",
  25. tiles = {"darkage_basalt.png"},
  26. is_ground_content = true,
  27. drop = get_node_drops("darkage:basalt","darkage:basalt_rubble"),
  28. groups = {cracky = 3, stone = 1},
  29. sounds = default.node_sound_stone_defaults()
  30. })
  31. minetest.register_node("darkage:basalt_rubble", {
  32. description = "Basalt Rubble",
  33. tiles = {"darkage_basalt_rubble.png"},
  34. is_ground_content = false,
  35. groups = {cracky = 3, stone = 2},
  36. sounds = default.node_sound_stone_defaults()
  37. })
  38. minetest.register_node("darkage:basalt_brick", {
  39. description = "Basalt Brick",
  40. tiles = {"darkage_basalt_brick.png"},
  41. is_ground_content = false,
  42. groups = {cracky = 2, stone = 1},
  43. sounds = default.node_sound_stone_defaults()
  44. })
  45. minetest.register_node("darkage:basalt_block", {
  46. description = "Basalt Block",
  47. tiles = {"darkage_basalt_block.png"},
  48. is_ground_content = false,
  49. groups = {cracky = 2, stone = 1},
  50. sounds = default.node_sound_stone_defaults()
  51. })
  52. --[[
  53. Chalk
  54. ]]
  55. minetest.register_node("darkage:chalk", {
  56. description = "Chalk",
  57. tiles = {"darkage_chalk.png"},
  58. is_ground_content = true,
  59. drop = 'darkage:chalk_powder 2',
  60. groups = {crumbly=2, cracky=2, not_cuttable=1},
  61. sounds = default.node_sound_stone_defaults()
  62. })
  63. minetest.register_node("darkage:cobble_with_plaster", {
  64. description = "Cobblestone with Plaster",
  65. tiles = {"darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_D.png)", "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_B.png)",
  66. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_C.png)", "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_A.png)",
  67. "default_cobble.png", "darkage_chalk.png"},
  68. is_ground_content = false,
  69. paramtype2 = "facedir",
  70. drop = 'default:cobble',
  71. groups = {cracky=3, not_cuttable=1},
  72. sounds = default.node_sound_stone_defaults(),
  73. })
  74. minetest.register_node("darkage:chalked_bricks_with_plaster", {
  75. description = "Chalked Bricks with Plaster",
  76. tiles = {"darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_D.png)", "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_B.png)",
  77. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_C.png)", "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_A.png)",
  78. "darkage_chalked_bricks.png", "darkage_chalk.png"},
  79. is_ground_content = false,
  80. paramtype2 = "facedir",
  81. drop = 'default:cobble',
  82. groups = {cracky=3, not_cuttable=1},
  83. sounds = default.node_sound_stone_defaults(),
  84. })
  85. --lbm to convert the old cobble_with_plaster to the new chalked_bricks to keep texture consistent
  86. minetest.register_lbm({
  87. name="darkage:convert_cobble_with_plaster",
  88. nodenames= "darkage:cobble_with_plaster",
  89. run_at_every_load = false,
  90. action = function(pos,node)
  91. node.name = "darkage:chalked_bricks_with_plaster"
  92. minetest.swap_node(pos, node)
  93. end
  94. })
  95. --[[
  96. Gneiss
  97. ]]
  98. minetest.register_node("darkage:gneiss", {
  99. description = "Gneiss",
  100. tiles = {"darkage_gneiss.png"},
  101. is_ground_content = true,
  102. groups = {cracky = 3, stone = 1},
  103. drop = get_node_drops("darkage:gneiss", "darkage:gneiss_rubble"),
  104. sounds = default.node_sound_stone_defaults()
  105. })
  106. minetest.register_node("darkage:gneiss_rubble", {
  107. description = "Gneiss Rubble",
  108. tiles = {"darkage_gneiss_rubble.png"},
  109. is_ground_content = false,
  110. groups = {cracky = 3, stone = 2},
  111. sounds = default.node_sound_stone_defaults()
  112. })
  113. minetest.register_node("darkage:gneiss_brick", {
  114. description = "Gneiss Brick",
  115. tiles = {"darkage_gneiss_brick.png"},
  116. is_ground_content = false,
  117. groups = {cracky = 2, stone = 1},
  118. sounds = default.node_sound_stone_defaults()
  119. })
  120. minetest.register_node("darkage:gneiss_block", {
  121. description = "Gneiss Block",
  122. tiles = {"darkage_gneiss_block.png"},
  123. is_ground_content = false,
  124. groups = {cracky = 2, stone = 1},
  125. sounds = default.node_sound_stone_defaults()
  126. })
  127. --[[
  128. Marble
  129. ]]
  130. minetest.register_node("darkage:marble", {
  131. description = "Marble",
  132. tiles = {"darkage_marble.png"},
  133. is_ground_content = true,
  134. groups = {cracky = 3, stone = 1},
  135. sounds = default.node_sound_stone_defaults()
  136. })
  137. minetest.register_node("darkage:marble_tile", {
  138. description = "Marble Tile",
  139. tiles = {"darkage_marble_tile.png"},
  140. is_ground_content = false,
  141. groups = {cracky=2},
  142. sounds = default.node_sound_stone_defaults()
  143. })
  144. minetest.register_node("darkage:mud", {
  145. description = "Mud",
  146. tiles = {"darkage_mud_up.png","darkage_mud.png"},
  147. is_ground_content = true,
  148. groups = {crumbly=3},
  149. drop = 'darkage:mud_lump 4',
  150. sounds = default.node_sound_dirt_defaults({
  151. footstep = "",
  152. }),
  153. })
  154. --[[
  155. Old Red Sandstone
  156. ]]
  157. minetest.register_node("darkage:ors", {
  158. description = "Old Red Sandstone",
  159. tiles = {"darkage_ors.png"},
  160. is_ground_content = true,
  161. drop = "darkage:ors_rubble",
  162. groups = {cracky=2},
  163. sounds = default.node_sound_stone_defaults()
  164. })
  165. minetest.register_node("darkage:ors_rubble", {
  166. description = "Old Red Sandstone Rubble",
  167. tiles = {"darkage_ors_rubble.png"},
  168. is_ground_content = true,
  169. groups = {cracky = 3, crumbly=2, stone = 2},
  170. sounds = default.node_sound_stone_defaults()
  171. })
  172. minetest.register_node("darkage:ors_brick", {
  173. description = "Old Red Sandstone Brick",
  174. tiles = {"darkage_ors_brick.png"},
  175. is_ground_content = false,
  176. groups = {cracky = 3, stone = 2},
  177. sounds = default.node_sound_stone_defaults()
  178. })
  179. minetest.register_node("darkage:ors_block", {
  180. description = "Old Red Sandstone Block",
  181. tiles = {"darkage_ors_block.png"},
  182. is_ground_content = false,
  183. groups = {cracky = 3, stone = 2},
  184. sounds = default.node_sound_stone_defaults()
  185. })
  186. minetest.register_node("darkage:serpentine", {
  187. description = "Serpentine",
  188. tiles = {"darkage_serpentine.png"},
  189. is_ground_content = true,
  190. groups = {cracky=3},
  191. sounds = default.node_sound_stone_defaults()
  192. })
  193. minetest.register_node("darkage:shale", {
  194. description = "Shale",
  195. tiles = {"darkage_shale.png","darkage_shale.png","darkage_shale_side.png"},
  196. is_ground_content = true,
  197. groups = {crumbly=2,cracky=2},
  198. sounds = default.node_sound_stone_defaults()
  199. })
  200. minetest.register_node("darkage:schist", {
  201. description = "Schist",
  202. tiles = {"darkage_schist.png"},
  203. is_ground_content = true,
  204. groups = {cracky=3},
  205. sounds = default.node_sound_stone_defaults()
  206. })
  207. minetest.register_node("darkage:silt", {
  208. description = "Silt",
  209. tiles = {"darkage_silt.png"},
  210. is_ground_content = true,
  211. groups = {crumbly=3},
  212. drop = 'darkage:silt_lump 4',
  213. sounds = default.node_sound_dirt_defaults({
  214. footstep = "",
  215. }),
  216. })
  217. --[[
  218. Slate
  219. ]]
  220. minetest.register_node("darkage:slate", {
  221. description = "Slate",
  222. tiles = {"darkage_slate.png","darkage_slate.png","darkage_slate_side.png"},
  223. is_ground_content = true,
  224. drop = 'darkage:slate_rubble',
  225. groups = {cracky=2, level=4},
  226. sounds = default.node_sound_stone_defaults()
  227. })
  228. minetest.register_node("darkage:slate_rubble", {
  229. description = "Slate Rubble",
  230. tiles = {"darkage_slate_rubble.png"},
  231. is_ground_content = false,
  232. groups = {cracky=2, level=4},
  233. sounds = default.node_sound_stone_defaults()
  234. })
  235. minetest.register_node("darkage:slate_tile", {
  236. description = "Slate Tile",
  237. tiles = {"darkage_slate_tile.png"},
  238. is_ground_content = false,
  239. groups = {cracky=2, level=4},
  240. sounds = default.node_sound_stone_defaults()
  241. })
  242. minetest.register_node("darkage:slate_block", {
  243. description = "Slate Block",
  244. tiles = {"darkage_slate_block.png"},
  245. is_ground_content = false,
  246. groups = {cracky=2, level=4},
  247. sounds = default.node_sound_stone_defaults()
  248. })
  249. minetest.register_node("darkage:slate_brick", {
  250. description = "Slate Brick",
  251. tiles = {"darkage_slate_brick.png"},
  252. is_ground_content = false,
  253. groups = {cracky=2, level=4},
  254. sounds = default.node_sound_stone_defaults()
  255. })
  256. -- Removed straw, because its in minetest game. Registering alias for compatibility reasons
  257. minetest.register_alias("darkage:straw", "farming:straw")
  258. minetest.register_node("darkage:stone_brick", {
  259. description = "Stone Brick",
  260. tiles = {"darkage_stone_brick.png"},
  261. is_ground_content = false,
  262. groups = {cracky=3},
  263. sounds = default.node_sound_stone_defaults()
  264. })
  265. minetest.register_node("darkage:straw_bale", {
  266. description = "Straw Bale",
  267. tiles = {"darkage_straw_bale.png"},
  268. is_ground_content = false,
  269. drop = 'farming:straw 4',
  270. groups = {snappy=2, flammable=2},
  271. sounds = default.node_sound_leaves_defaults(),
  272. })
  273. --[[
  274. Tuff
  275. ]]
  276. minetest.register_node("darkage:tuff", {
  277. description = "Tuff",
  278. tiles = {"darkage_tuff.png"},
  279. is_ground_content = true,
  280. legacy_mineral = true,
  281. groups = {cracky = 3, stone = 1, level=4},
  282. drop = {
  283. max_items = 1,
  284. items = {
  285. {
  286. -- player get tuff node if he is lucky :)
  287. items = {'darkage:tuff'},
  288. rarity = 3,
  289. },
  290. {
  291. -- player will get rubble with 2/3 chance
  292. items = {'darkage:tuff_rubble'},
  293. }
  294. }
  295. },
  296. sounds = default.node_sound_stone_defaults()
  297. })
  298. minetest.register_node("darkage:tuff_bricks", {
  299. description = "Tuff Bricks",
  300. tiles = {"darkage_tuff_bricks.png"},
  301. is_ground_content = false,
  302. groups = {cracky=2, level=4},
  303. sounds = default.node_sound_stone_defaults()
  304. })
  305. -- abm to turn Tuff bricks to old Tuff bricks if water is nearby
  306. minetest.register_abm({
  307. label = 'Tuff bricks to old Tuff if near water.',
  308. nodenames = {"darkage:tuff_bricks"},
  309. neighbors = {"group:water"},
  310. interval = 16,
  311. chance = 200,
  312. catch_up = false,
  313. action = function(pos, node)
  314. minetest.set_node(pos, {name = "darkage:old_tuff_bricks"})
  315. end
  316. })
  317. minetest.register_node("darkage:tuff_rubble", {
  318. description = "Tuff Rubble",
  319. tiles = {"darkage_tuff_rubble.png"},
  320. groups = {crumbly = 2, cracky = 2, falling_node = 1, level=4},
  321. sounds = default.node_sound_gravel_defaults(),
  322. })
  323. --[[
  324. Rhyolitic Tuff
  325. ]]
  326. minetest.register_node("darkage:rhyolitic_tuff", {
  327. description = "Rhyolitic Tuff",
  328. tiles = {"darkage_rhyolitic_tuff.png"},
  329. is_ground_content = true,
  330. legacy_mineral = true,
  331. groups = {cracky = 3, stone = 1, level=4},
  332. drop = {
  333. max_items = 1,
  334. items = {
  335. {
  336. -- player get tuff node if he is lucky :)
  337. items = {'darkage:rhyolitic_tuff'},
  338. rarity = 3,
  339. },
  340. {
  341. -- player will get rubble with 2/3 chance
  342. items = {'darkage:rhyolitic_tuff_rubble'},
  343. }
  344. }
  345. },
  346. sounds = default.node_sound_stone_defaults()
  347. })
  348. minetest.register_node("darkage:rhyolitic_tuff_bricks", {
  349. description = "Rhyolitic Tuff Bricks",
  350. tiles = {"darkage_rhyolitic_tuff_bricks.png"},
  351. is_ground_content = false,
  352. groups = {cracky=2, level=4},
  353. sounds = default.node_sound_stone_defaults()
  354. })
  355. minetest.register_node("darkage:old_tuff_bricks", {
  356. description = "Old Tuff Bricks",
  357. tiles = {"darkage_old_tuff_bricks.png"},
  358. is_ground_content = false,
  359. groups = {cracky=3, level=4},
  360. sounds = default.node_sound_stone_defaults()
  361. })
  362. minetest.register_node("darkage:rhyolitic_tuff_rubble", {
  363. description = "Rhyolitic Tuff Rubble",
  364. tiles = {"darkage_rhyolitic_tuff_rubble.png"},
  365. groups = {crumbly = 2, falling_node = 1, level=4},
  366. sounds = default.node_sound_gravel_defaults(),
  367. })
  368. --[[
  369. add a node using the cobble texture that was introduced in minetest 0.4.dev-20120408 and got removed in 0.4.7
  370. It has a nice contrast together the stone bricks, so I think it could get usefull.
  371. ]]
  372. minetest.register_node("darkage:chalked_bricks", {
  373. description = "Chalked Brick",
  374. tiles = {"darkage_chalked_bricks.png"},
  375. is_ground_content = false,
  376. groups = {cracky = 2, stone = 1},
  377. sounds = default.node_sound_stone_defaults(),
  378. })
  379. minetest.register_craft({
  380. output = "darkage:chalked_bricks 4",
  381. recipe = {
  382. {"default:stone", "default:stone", "darkage:chalk_powder"},
  383. {"darkage:chalk_powder", "darkage:chalk_powder", "darkage:chalk_powder"},
  384. {"default:stone", "darkage:chalk_powder", "default:stone"},
  385. }
  386. })