init.lua 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802
  1. -- Mod is to be reloadable.
  2. if not minetest.global_exists("darkage") then darkage = {} end
  3. darkage.modpath = minetest.get_modpath("darkage")
  4. -- Functions.
  5. dofile(darkage.modpath .. "/functions.lua")
  6. if not darkage.run_once then
  7. -- Craftitems.
  8. minetest.register_craftitem("darkage:chalk_powder", {
  9. description = "Chalk Powder",
  10. inventory_image = "darkage_chalk_powder.png",
  11. })
  12. minetest.register_craftitem("darkage:mud_lump", {
  13. description = "Mud Lump",
  14. inventory_image = "darkage_mud_lump.png",
  15. })
  16. minetest.register_craftitem("darkage:silt_lump", {
  17. description = "Silt Lump",
  18. inventory_image = "darkage_silt_lump.png",
  19. })
  20. minetest.register_craftitem("darkage:iron_stick", {
  21. description = "Wrought Iron Rod\n\nCan be used to test protection.\nAlso updates infotext names.",
  22. inventory_image = "darkage_iron_stick.png",
  23. on_use = function(...) return default.strike_protection(...) end,
  24. })
  25. -- Nodes.
  26. minetest.register_node("darkage:straw_bale", {
  27. description = "Straw Bale",
  28. tiles = {"darkage_straw_bale.png"},
  29. paramtype2 = "facedir",
  30. groups = utility.dig_groups("straw", {flammable=4, falling_node=1}),
  31. sounds = default.node_sound_leaves_defaults(),
  32. })
  33. minetest.register_node("darkage:glass", {
  34. description = "Clean Medieval Glass",
  35. drawtype = "glasslike",
  36. tiles = {"darkage_glass.png"},
  37. use_texture_alpha = "blend",
  38. paramtype = "light",
  39. sunlight_propagates = true,
  40. groups = utility.dig_groups("glass"),
  41. sounds = default.node_sound_glass_defaults(),
  42. silverpick_drop = true,
  43. drop = {
  44. max_items = 2,
  45. items = {
  46. {
  47. items = {"vessels:glass_fragments"},
  48. rarity = 1,
  49. },
  50. {
  51. items = {"default:steel_ingot"},
  52. rarity = 3,
  53. },
  54. }
  55. },
  56. })
  57. minetest.register_node("darkage:milk_glass", {
  58. description = "Milky Medieval Glass",
  59. drawtype = "glasslike",
  60. tiles = {"darkage_milk_glass.png"},
  61. use_texture_alpha = "blend",
  62. paramtype = "light",
  63. sunlight_propagates = true,
  64. groups = utility.dig_groups("glass"),
  65. sounds = default.node_sound_glass_defaults(),
  66. silverpick_drop = true,
  67. drop = {
  68. max_items = 2,
  69. items = {
  70. {
  71. items = {"vessels:glass_fragments"},
  72. rarity = 1,
  73. },
  74. {
  75. items = {"default:steel_ingot"},
  76. rarity = 3,
  77. },
  78. }
  79. },
  80. })
  81. minetest.register_node("darkage:glow_glass", {
  82. description = "Medieval Glow Glass",
  83. drawtype = "glasslike",
  84. tiles = {"darkage_glass.png"},
  85. use_texture_alpha = "blend",
  86. paramtype = "light",
  87. sunlight_propagates = true,
  88. light_source = 12,
  89. groups = utility.dig_groups("glass"),
  90. sounds = default.node_sound_glass_defaults(),
  91. silverpick_drop = true,
  92. drop = {
  93. max_items = 2,
  94. items = {
  95. {
  96. items = {"vessels:glass_fragments"},
  97. rarity = 1,
  98. },
  99. {
  100. items = {"default:steel_ingot"},
  101. rarity = 3,
  102. },
  103. {
  104. items = {"xdecor:lantern"},
  105. rarity = 3,
  106. },
  107. }
  108. },
  109. })
  110. minetest.register_node("darkage:glass_round", {
  111. description = "Round Glass",
  112. drawtype = "glasslike",
  113. tiles = {"darkage_glass_round.png"},
  114. paramtype = "light",
  115. use_texture_alpha = "blend",
  116. sunlight_propagates = true,
  117. sounds = default.node_sound_glass_defaults(),
  118. groups = utility.dig_groups("glass"),
  119. silverpick_drop = true,
  120. drop = {
  121. max_items = 2,
  122. items = {
  123. {
  124. items = {"vessels:glass_fragments"},
  125. rarity = 1,
  126. },
  127. {
  128. items = {"default:steel_ingot"},
  129. rarity = 3,
  130. },
  131. }
  132. },
  133. })
  134. minetest.register_node("darkage:milk_glass_round", {
  135. description = "Milky Medieval Round Glass",
  136. drawtype = "glasslike",
  137. tiles = {"darkage_milk_glass_round.png"},
  138. use_texture_alpha = "blend",
  139. paramtype = "light",
  140. sunlight_propagates = true,
  141. groups = utility.dig_groups("glass"),
  142. sounds = default.node_sound_glass_defaults(),
  143. silverpick_drop = true,
  144. drop = {
  145. max_items = 2,
  146. items = {
  147. {
  148. items = {"vessels:glass_fragments"},
  149. rarity = 1,
  150. },
  151. {
  152. items = {"default:steel_ingot"},
  153. rarity = 3,
  154. },
  155. }
  156. },
  157. })
  158. minetest.register_node("darkage:glass_square", {
  159. description = "Square Glass",
  160. drawtype = "glasslike",
  161. tiles = {"darkage_glass_square.png"},
  162. paramtype = "light",
  163. use_texture_alpha = "blend",
  164. sunlight_propagates = true,
  165. sounds = default.node_sound_glass_defaults(),
  166. groups = utility.dig_groups("glass"),
  167. silverpick_drop = true,
  168. drop = {
  169. max_items = 2,
  170. items = {
  171. {
  172. items = {"vessels:glass_fragments"},
  173. rarity = 1,
  174. },
  175. {
  176. items = {"default:steel_ingot"},
  177. rarity = 3,
  178. },
  179. }
  180. },
  181. })
  182. minetest.register_node("darkage:milk_glass_square", {
  183. description = "Milky Medieval Square Glass",
  184. drawtype = "glasslike",
  185. tiles = {"darkage_milk_glass_square.png"},
  186. use_texture_alpha = "blend",
  187. paramtype = "light",
  188. sunlight_propagates = true,
  189. groups = utility.dig_groups("glass"),
  190. sounds = default.node_sound_glass_defaults(),
  191. silverpick_drop = true,
  192. drop = {
  193. max_items = 2,
  194. items = {
  195. {
  196. items = {"vessels:glass_fragments"},
  197. rarity = 1,
  198. },
  199. {
  200. items = {"default:steel_ingot"},
  201. rarity = 3,
  202. },
  203. }
  204. },
  205. })
  206. minetest.register_node("darkage:lamp", {
  207. description = "Lamp Lattice",
  208. tiles = {"darkage_lamp.png"},
  209. paramtype = "light",
  210. light_source = default.LIGHT_MAX - 2,
  211. groups = utility.dig_groups("bigitem", {flammable=1}),
  212. sounds = default.node_sound_glass_defaults(),
  213. })
  214. minetest.register_node("darkage:wood_frame", {
  215. description = "Wood Framed Glass",
  216. drawtype = "glasslike_framed",
  217. tiles = {"darkage_wood_frame.png"},
  218. is_ground_content = false,
  219. paramtype = "light",
  220. sunlight_propagates = true,
  221. groups = utility.dig_groups("glass"),
  222. sounds = default.node_sound_stone_defaults(),
  223. silverpick_drop = true,
  224. drop = {
  225. max_items = 2,
  226. items = {
  227. {
  228. items = {"vessels:glass_fragments", "default:stick"},
  229. rarity = 1,
  230. },
  231. }
  232. },
  233. })
  234. minetest.register_node("darkage:stone_brick", {
  235. description = "Stone Masonry",
  236. tiles = {"darkage_stone_brick.png"},
  237. paramtype2 = "facedir",
  238. groups = utility.dig_groups("brick", {brick=1}),
  239. sounds = default.node_sound_stone_defaults()
  240. })
  241. minetest.register_node("darkage:chalk", {
  242. description = "Chalk",
  243. tiles = {"darkage_chalk.png"},
  244. drop = 'darkage:chalk_powder 4',
  245. _is_bulk_mapgen_stone = true,
  246. groups = utility.dig_groups("clay", {falling_node=1}),
  247. sounds = default.node_sound_stone_defaults()
  248. })
  249. minetest.register_node("darkage:chalked_bricks", {
  250. description = "Chalked Brick",
  251. tiles = {"darkage_chalked_bricks.png"},
  252. paramtype2 = "facedir",
  253. groups = utility.dig_groups("brick", {brick=1}),
  254. sounds = default.node_sound_stone_defaults(),
  255. })
  256. minetest.register_node("darkage:adobe", {
  257. description = "Adobe",
  258. tiles = {"darkage_adobe.png"},
  259. groups = utility.dig_groups("hardclay"),
  260. sounds = default.node_sound_sand_defaults(),
  261. })
  262. minetest.register_node("darkage:cobble_with_plaster", {
  263. description = "Cobblestone With Plaster",
  264. tiles = {
  265. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_D.png)",
  266. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_B.png)",
  267. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_C.png)",
  268. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_A.png)",
  269. "default_cobble.png",
  270. "darkage_chalk.png",
  271. },
  272. paramtype2 = "facedir",
  273. drop = 'default:cobble',
  274. groups = utility.dig_groups("cobble"),
  275. sounds = default.node_sound_stone_defaults(),
  276. })
  277. minetest.register_node("darkage:chalked_bricks_with_plaster", {
  278. description = "Chalked Bricks With Plaster",
  279. tiles = {
  280. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_D.png)",
  281. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_B.png)",
  282. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_C.png)",
  283. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_A.png)",
  284. "darkage_chalked_bricks.png",
  285. "darkage_chalk.png",
  286. },
  287. paramtype2 = "facedir",
  288. drop = 'default:cobble',
  289. groups = utility.dig_groups("brick", {brick=1}),
  290. sounds = default.node_sound_stone_defaults(),
  291. })
  292. -- Sterile dirt does not grow plants. This soil is useless for farming.
  293. minetest.register_node("darkage:darkdirt", {
  294. description = "Coarse Sterile Dirt",
  295. tiles = {"darkage_darkdirt.png"},
  296. groups = utility.dig_groups("dirt", {dirt_type = 1, sterile_dirt_type = 1, raw_dirt_type = 1, falling_node = 1}),
  297. sounds = default.node_sound_dirt_defaults(),
  298. })
  299. minetest.register_node("darkage:mud", {
  300. description = "Mud",
  301. tiles = {"darkage_mud_up.png", "darkage_mud.png"},
  302. groups = utility.dig_groups("mud", {falling_node=1}),
  303. drop = 'darkage:mud_lump 4',
  304. sounds = default.node_sound_dirt_defaults(),
  305. })
  306. minetest.register_node("darkage:silt", {
  307. description = "Silt",
  308. tiles = {"darkage_silt.png"},
  309. groups = utility.dig_groups("mud", {falling_node=1}),
  310. drop = 'darkage:silt_lump 4',
  311. sounds = default.node_sound_dirt_defaults(),
  312. })
  313. minetest.register_node("darkage:schist", {
  314. description = "Schist",
  315. tiles = {"darkage_schist.png"},
  316. groups = utility.dig_groups("softstone"),
  317. sounds = default.node_sound_stone_defaults(),
  318. _is_bulk_mapgen_stone = true,
  319. _toolranks = {
  320. ignore = true,
  321. },
  322. })
  323. minetest.register_node("darkage:gneiss", {
  324. description = "Gneiss",
  325. tiles = {"darkage_gneiss.png"},
  326. groups = utility.dig_groups("softstone", {stone=1}),
  327. drop = "darkage:gneiss_rubble",
  328. _is_bulk_mapgen_stone = true,
  329. sounds = default.node_sound_stone_defaults(),
  330. _toolranks = {
  331. ignore = true,
  332. },
  333. })
  334. minetest.register_node("darkage:gneiss_rubble", {
  335. description = "Gneiss Rubble",
  336. tiles = {"darkage_gneiss_rubble.png"},
  337. groups = utility.dig_groups("cobble", {stone=1}),
  338. sounds = default.node_sound_stone_defaults(),
  339. _is_bulk_mapgen_stone = true,
  340. _toolranks = {
  341. ignore = true,
  342. },
  343. })
  344. minetest.register_node("darkage:gneiss_brick", {
  345. description = "Gneiss Brick",
  346. tiles = {"darkage_gneiss_brick.png"},
  347. paramtype2 = "facedir",
  348. groups = utility.dig_groups("brick", {stone=1}),
  349. sounds = default.node_sound_stone_defaults()
  350. })
  351. minetest.register_node("darkage:gneiss_block", {
  352. description = "Gneiss Block",
  353. tiles = {"darkage_gneiss_block.png"},
  354. groups = utility.dig_groups("block", {stone=1}),
  355. sounds = default.node_sound_stone_defaults()
  356. })
  357. minetest.register_node("darkage:marble", {
  358. description = "White Serpentine",
  359. tiles = {"darkage_marble.png"},
  360. groups = utility.dig_groups("hardstone", {stone=1}),
  361. sounds = default.node_sound_stone_defaults()
  362. })
  363. minetest.register_node("darkage:marble_tile", {
  364. description = "White Serpentine Tile",
  365. tiles = {"darkage_marble_tile.png"},
  366. paramtype2 = "facedir",
  367. groups = utility.dig_groups("stone", {brick=1}),
  368. sounds = default.node_sound_stone_defaults()
  369. })
  370. minetest.register_node("darkage:slate", {
  371. description = "Slate",
  372. tiles = {"darkage_slate.png", "darkage_slate.png", "darkage_slate_side.png"},
  373. drop = 'darkage:slate_rubble',
  374. groups = utility.dig_groups("softstone"),
  375. sounds = default.node_sound_stone_defaults(),
  376. _is_bulk_mapgen_stone = true,
  377. _toolranks = {
  378. ignore = true,
  379. },
  380. })
  381. minetest.register_node("darkage:slate_rubble", {
  382. description = "Slate Rubble",
  383. tiles = {"darkage_slate_rubble.png"},
  384. groups = utility.dig_groups("softcobble"),
  385. sounds = default.node_sound_stone_defaults(),
  386. _is_bulk_mapgen_stone = true,
  387. _toolranks = {
  388. ignore = true,
  389. },
  390. })
  391. minetest.register_node("darkage:slate_tile", {
  392. description = "Slate Tile",
  393. tiles = {"darkage_slate_tile.png"},
  394. paramtype2 = "facedir",
  395. groups = utility.dig_groups("cobble"),
  396. sounds = default.node_sound_stone_defaults(),
  397. })
  398. minetest.register_node("darkage:slate_block", {
  399. description = "Slate Block",
  400. tiles = {"darkage_slate_block.png"},
  401. groups = utility.dig_groups("block", {block=1}),
  402. sounds = default.node_sound_stone_defaults(),
  403. })
  404. minetest.register_node("darkage:slate_brick", {
  405. description = "Slate Brick",
  406. tiles = {"darkage_slate_brick.png"},
  407. paramtype2 = "facedir",
  408. groups = utility.dig_groups("brick", {brick=1}),
  409. sounds = default.node_sound_stone_defaults(),
  410. })
  411. minetest.register_node("darkage:shale", {
  412. description = "Shale",
  413. tiles = {"darkage_shale.png", "darkage_shale.png", "darkage_shale_side.png"},
  414. groups = utility.dig_groups("softstone"),
  415. sounds = default.node_sound_stone_defaults(),
  416. _is_bulk_mapgen_stone = true,
  417. _toolranks = {
  418. ignore = true,
  419. },
  420. })
  421. minetest.register_node("darkage:ors", {
  422. description = "Old Red Sandstone",
  423. tiles = {"darkage_ors.png"},
  424. drop = "darkage:ors_rubble",
  425. groups = utility.dig_groups("stone"),
  426. sounds = default.node_sound_stone_defaults(),
  427. _is_bulk_mapgen_stone = true,
  428. _toolranks = {
  429. ignore = true,
  430. },
  431. })
  432. minetest.register_node("darkage:ors_rubble", {
  433. description = "Old Red Sandstone Rubble",
  434. tiles = {"darkage_ors_rubble.png"},
  435. groups = utility.dig_groups("softcobble", {stone = 1}),
  436. sounds = default.node_sound_stone_defaults(),
  437. _is_bulk_mapgen_stone = true,
  438. _toolranks = {
  439. ignore = true,
  440. },
  441. })
  442. minetest.register_node("darkage:ors_brick", {
  443. description = "Old Red Sandstone Brick",
  444. tiles = {"darkage_ors_brick.png"},
  445. paramtype2 = "facedir",
  446. groups = utility.dig_groups("brick", {brick=1}),
  447. sounds = default.node_sound_stone_defaults()
  448. })
  449. minetest.register_node("darkage:ors_block", {
  450. description = "Old Red Sandstone Block",
  451. tiles = {"darkage_ors_block.png"},
  452. groups = utility.dig_groups("block", {stone = 2}),
  453. sounds = default.node_sound_stone_defaults()
  454. })
  455. minetest.register_node("darkage:tuff", {
  456. description = "Tuff",
  457. tiles = {"darkage_tuff.png"},
  458. groups = utility.dig_groups("cobble", {stone = 1}),
  459. drop = 'darkage:tuff_rubble',
  460. sounds = default.node_sound_stone_defaults(),
  461. _is_bulk_mapgen_stone = true,
  462. _toolranks = {
  463. ignore = true,
  464. },
  465. })
  466. minetest.register_node("darkage:tuff_bricks", {
  467. description = "Tuff Bricks",
  468. tiles = {"darkage_tuff_bricks.png"},
  469. paramtype2 = "facedir",
  470. groups = utility.dig_groups("brick", {brick=1}),
  471. sounds = default.node_sound_stone_defaults()
  472. })
  473. minetest.register_node("darkage:tuff_rubble", {
  474. description = "Tuff Rubble",
  475. tiles = {"darkage_tuff_rubble.png"},
  476. groups = utility.dig_groups("cobble", {falling_node = 1}),
  477. sounds = default.node_sound_gravel_defaults(),
  478. _is_bulk_mapgen_stone = true,
  479. _toolranks = {
  480. ignore = true,
  481. },
  482. })
  483. minetest.register_node("darkage:old_tuff_bricks", {
  484. description = "Old Tuff Bricks",
  485. tiles = {"darkage_old_tuff_bricks.png"},
  486. paramtype2 = "facedir",
  487. groups = utility.dig_groups("brick", {brick=1}),
  488. sounds = default.node_sound_stone_defaults()
  489. })
  490. minetest.register_node("darkage:rhyolitic_tuff", {
  491. description = "Rhyolitic Tuff",
  492. tiles = {"darkage_rhyolitic_tuff.png"},
  493. groups = utility.dig_groups("cobble", {stone = 1}),
  494. drop = 'darkage:rhyolitic_tuff_rubble',
  495. sounds = default.node_sound_stone_defaults(),
  496. _is_bulk_mapgen_stone = true,
  497. _toolranks = {
  498. ignore = true,
  499. },
  500. })
  501. minetest.register_node("darkage:rhyolitic_tuff_rubble", {
  502. description = "Rhyolitic Tuff Rubble",
  503. tiles = {"darkage_rhyolitic_tuff_rubble.png"},
  504. groups = utility.dig_groups("softcobble", {falling_node = 1}),
  505. sounds = default.node_sound_gravel_defaults(),
  506. _is_bulk_mapgen_stone = true,
  507. _toolranks = {
  508. ignore = true,
  509. },
  510. })
  511. minetest.register_node("darkage:rhyolitic_tuff_bricks", {
  512. description = "Rhyolitic Tuff Bricks",
  513. tiles = {"darkage_rhyolitic_tuff_bricks.png"},
  514. paramtype2 = "facedir",
  515. groups = utility.dig_groups("brick", {brick=1}),
  516. sounds = default.node_sound_stone_defaults()
  517. })
  518. minetest.register_node("darkage:basaltic", {
  519. --[[
  520. drawtype = "airlike",
  521. paramtype = "light",
  522. sunlight_propagates = true,
  523. light_source = 15,
  524. pointable = false,
  525. --]]
  526. description = "Basaltic Rock",
  527. tiles = {"darkage_basalt.png"},
  528. drop = "darkage:basaltic_rubble",
  529. _is_bulk_mapgen_stone = true,
  530. groups = utility.dig_groups("hardstone", {stone = 1, native_stone = 1}),
  531. sounds = default.node_sound_stone_defaults(),
  532. movement_speed_multiplier = default.ROAD_SPEED,
  533. -- Collapsed stone breaks up into cobble.
  534. on_finish_collapse = function(pos, node)
  535. minetest.swap_node(pos, {name="darkage:basaltic_rubble"})
  536. end,
  537. on_collapse_to_entity = function(pos, node)
  538. minetest.add_item(pos, {name="darkage:basaltic_rubble"})
  539. end,
  540. _toolranks = {
  541. ignore = true,
  542. },
  543. })
  544. minetest.register_node("darkage:unstable_basalt", {
  545. description = "Basaltic Rock (Please Report To Admin)",
  546. tiles = {"darkage_basalt.png"},
  547. drop = "darkage:basaltic_rubble",
  548. _is_bulk_mapgen_stone = true,
  549. groups = utility.dig_groups("hardstone", {stone = 1, falling_node = 1}),
  550. sounds = default.node_sound_stone_defaults(),
  551. movement_speed_multiplier = default.ROAD_SPEED,
  552. -- Collapsed stone breaks up into cobble.
  553. on_finish_collapse = function(pos, node)
  554. minetest.swap_node(pos, {name="darkage:basaltic_rubble"})
  555. end,
  556. on_collapse_to_entity = function(pos, node)
  557. minetest.add_item(pos, {name="darkage:basaltic_rubble"})
  558. end,
  559. -- Player walking on it causes collapse.
  560. on_player_walk_over = function(pos, player)
  561. minetest.check_for_falling(pos)
  562. end,
  563. _toolranks = {
  564. ignore = true,
  565. },
  566. })
  567. minetest.register_node("darkage:basaltic_rubble", {
  568. description = "Basaltic Rubble",
  569. tiles = {{name="darkage_basalt_rubble_32x32.png", align_style="world", scale=2}},
  570. groups = utility.dig_groups("cobble", {stone = 1, native_stone = 1}),
  571. sounds = default.node_sound_stone_defaults(),
  572. _is_bulk_mapgen_stone = true,
  573. _toolranks = {
  574. ignore = true,
  575. },
  576. })
  577. minetest.register_node("darkage:basaltic_brick", {
  578. description = "Basaltic Brick",
  579. tiles = {"darkage_basalt_brick.png"},
  580. paramtype2 = "facedir",
  581. groups = utility.dig_groups("brick", {brick=1}),
  582. sounds = default.node_sound_stone_defaults()
  583. })
  584. minetest.register_node("darkage:basaltic_block", {
  585. description = "Basaltic Block",
  586. tiles = {"darkage_basalt_block.png"},
  587. groups = utility.dig_groups("block", {block=1}),
  588. sounds = default.node_sound_stone_defaults()
  589. })
  590. minetest.register_node("darkage:box", {
  591. description = "Wooden Box",
  592. tiles = {
  593. "darkage_box_top.png",
  594. "darkage_box_top.png",
  595. "darkage_box.png",
  596. },
  597. groups = utility.dig_groups("furniture"),
  598. sounds = default.node_sound_wood_defaults(),
  599. on_rightclick = function(...)
  600. return darkage.on_rightclick(...)
  601. end,
  602. on_construct = function(...)
  603. return darkage.on_construct(...)
  604. end,
  605. after_place_node = function(...)
  606. return darkage.after_place_node(...)
  607. end,
  608. can_dig = function(...)
  609. return darkage.can_dig(...)
  610. end,
  611. allow_metadata_inventory_move = function(...)
  612. return darkage.allow_metadata_inventory_move(...)
  613. end,
  614. allow_metadata_inventory_put = function(...)
  615. return darkage.allow_metadata_inventory_put(...)
  616. end,
  617. allow_metadata_inventory_take = function(...)
  618. return darkage.allow_metadata_inventory_take(...)
  619. end,
  620. on_metadata_inventory_move = function(...)
  621. return darkage.on_metadata_inventory_move(...)
  622. end,
  623. on_metadata_inventory_put = function(...)
  624. return darkage.on_metadata_inventory_put(...)
  625. end,
  626. on_metadata_inventory_take = function(...)
  627. return darkage.on_metadata_inventory_take(...)
  628. end,
  629. on_blast = function(...)
  630. return darkage.on_blast(...)
  631. end,
  632. })
  633. minetest.register_node("darkage:wood_shelves", {
  634. description = "Wooden Shelf",
  635. tiles = {
  636. "darkage_shelves.png",
  637. "darkage_shelves.png",
  638. "darkage_shelves.png",
  639. "darkage_shelves.png",
  640. "darkage_shelves.png",
  641. "darkage_shelves_front.png",
  642. },
  643. paramtype2 = "facedir",
  644. groups = utility.dig_groups("furniture"),
  645. sounds = default.node_sound_wood_defaults(),
  646. on_rightclick = function(...)
  647. return darkage.on_rightclick(...)
  648. end,
  649. on_construct = function(...)
  650. return darkage.on_construct(...)
  651. end,
  652. after_place_node = function(...)
  653. return darkage.after_place_node(...)
  654. end,
  655. can_dig = function(...)
  656. return darkage.can_dig(...)
  657. end,
  658. allow_metadata_inventory_move = function(...)
  659. return darkage.allow_metadata_inventory_move(...)
  660. end,
  661. allow_metadata_inventory_put = function(...)
  662. return darkage.allow_metadata_inventory_put(...)
  663. end,
  664. allow_metadata_inventory_take = function(...)
  665. return darkage.allow_metadata_inventory_take(...)
  666. end,
  667. on_metadata_inventory_move = function(...)
  668. return darkage.on_metadata_inventory_move(...)
  669. end,
  670. on_metadata_inventory_put = function(...)
  671. return darkage.on_metadata_inventory_put(...)
  672. end,
  673. on_metadata_inventory_take = function(...)
  674. return darkage.on_metadata_inventory_take(...)
  675. end,
  676. on_blast = function(...)
  677. return darkage.on_blast(...)
  678. end,
  679. })
  680. minetest.register_on_player_receive_fields(function(...)
  681. return darkage.on_player_receive_fields(...)
  682. end)
  683. -- Register mod as reloadable.
  684. local c = "darkage:core"
  685. local f = darkage.modpath .. "/init.lua"
  686. reload.register_file(c, f, false)
  687. darkage.run_once = true
  688. end