init.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686
  1. -- Mod is to be reloadable.
  2. darkage = darkage or {}
  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 = default.strike_protection,
  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 = true,
  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 = true,
  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 = true,
  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 = true,
  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 = true,
  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 = true,
  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 = true,
  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. groups = utility.dig_groups("clay", {falling_node=1}),
  246. sounds = default.node_sound_stone_defaults()
  247. })
  248. minetest.register_node("darkage:chalked_bricks", {
  249. description = "Chalked Brick",
  250. tiles = {"darkage_chalked_bricks.png"},
  251. paramtype2 = "facedir",
  252. groups = utility.dig_groups("brick", {brick=1}),
  253. sounds = default.node_sound_stone_defaults(),
  254. })
  255. minetest.register_node("darkage:adobe", {
  256. description = "Adobe",
  257. tiles = {"darkage_adobe.png"},
  258. groups = utility.dig_groups("hardclay"),
  259. sounds = default.node_sound_sand_defaults(),
  260. })
  261. minetest.register_node("darkage:cobble_with_plaster", {
  262. description = "Cobblestone With Plaster",
  263. tiles = {
  264. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_D.png)",
  265. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_B.png)",
  266. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_C.png)",
  267. "darkage_chalk.png^(default_cobble.png^[mask:darkage_plaster_mask_A.png)",
  268. "default_cobble.png",
  269. "darkage_chalk.png",
  270. },
  271. paramtype2 = "facedir",
  272. drop = 'default:cobble',
  273. groups = utility.dig_groups("cobble"),
  274. sounds = default.node_sound_stone_defaults(),
  275. })
  276. minetest.register_node("darkage:chalked_bricks_with_plaster", {
  277. description = "Chalked Bricks With Plaster",
  278. tiles = {
  279. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_D.png)",
  280. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_B.png)",
  281. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_C.png)",
  282. "darkage_chalk.png^(darkage_chalked_bricks.png^[mask:darkage_plaster_mask_A.png)",
  283. "darkage_chalked_bricks.png",
  284. "darkage_chalk.png",
  285. },
  286. paramtype2 = "facedir",
  287. drop = 'default:cobble',
  288. groups = utility.dig_groups("brick", {brick=1}),
  289. sounds = default.node_sound_stone_defaults(),
  290. })
  291. -- Sterile dirt does not grow plants. This soil is useless for farming.
  292. minetest.register_node("darkage:darkdirt", {
  293. description = "Coarse Sterile Dirt",
  294. tiles = {"darkage_darkdirt.png"},
  295. groups = utility.dig_groups("dirt", {dirt_type = 1, sterile_dirt_type = 1, raw_dirt_type = 1, falling_node = 1}),
  296. sounds = default.node_sound_dirt_defaults(),
  297. })
  298. minetest.register_node("darkage:mud", {
  299. description = "Mud",
  300. tiles = {"darkage_mud_up.png", "darkage_mud.png"},
  301. groups = utility.dig_groups("mud", {falling_node=1}),
  302. drop = 'darkage:mud_lump 4',
  303. sounds = default.node_sound_dirt_defaults(),
  304. })
  305. minetest.register_node("darkage:silt", {
  306. description = "Silt",
  307. tiles = {"darkage_silt.png"},
  308. groups = utility.dig_groups("mud", {falling_node=1}),
  309. drop = 'darkage:silt_lump 4',
  310. sounds = default.node_sound_dirt_defaults(),
  311. })
  312. minetest.register_node("darkage:schist", {
  313. description = "Schist",
  314. tiles = {"darkage_schist.png"},
  315. groups = utility.dig_groups("softstone"),
  316. sounds = default.node_sound_stone_defaults()
  317. })
  318. minetest.register_node("darkage:gneiss", {
  319. description = "Gneiss",
  320. tiles = {"darkage_gneiss.png"},
  321. groups = utility.dig_groups("softstone", {stone=1}),
  322. drop = "darkage:gneiss_rubble",
  323. sounds = default.node_sound_stone_defaults()
  324. })
  325. minetest.register_node("darkage:gneiss_rubble", {
  326. description = "Gneiss Rubble",
  327. tiles = {"darkage_gneiss_rubble.png"},
  328. groups = utility.dig_groups("cobble", {stone=1}),
  329. sounds = default.node_sound_stone_defaults()
  330. })
  331. minetest.register_node("darkage:gneiss_brick", {
  332. description = "Gneiss Brick",
  333. tiles = {"darkage_gneiss_brick.png"},
  334. paramtype2 = "facedir",
  335. groups = utility.dig_groups("brick", {stone=1}),
  336. sounds = default.node_sound_stone_defaults()
  337. })
  338. minetest.register_node("darkage:gneiss_block", {
  339. description = "Gneiss Block",
  340. tiles = {"darkage_gneiss_block.png"},
  341. groups = utility.dig_groups("block", {stone=1}),
  342. sounds = default.node_sound_stone_defaults()
  343. })
  344. minetest.register_node("darkage:marble", {
  345. description = "White Serpentine",
  346. tiles = {"darkage_marble.png"},
  347. groups = utility.dig_groups("hardstone", {stone=1}),
  348. sounds = default.node_sound_stone_defaults()
  349. })
  350. minetest.register_node("darkage:marble_tile", {
  351. description = "White Serpentine Tile",
  352. tiles = {"darkage_marble_tile.png"},
  353. paramtype2 = "facedir",
  354. groups = utility.dig_groups("stone", {brick=1}),
  355. sounds = default.node_sound_stone_defaults()
  356. })
  357. minetest.register_node("darkage:slate", {
  358. description = "Slate",
  359. tiles = {"darkage_slate.png", "darkage_slate.png", "darkage_slate_side.png"},
  360. drop = 'darkage:slate_rubble',
  361. groups = utility.dig_groups("softstone"),
  362. sounds = default.node_sound_stone_defaults()
  363. })
  364. minetest.register_node("darkage:slate_rubble", {
  365. description = "Slate Rubble",
  366. tiles = {"darkage_slate_rubble.png"},
  367. groups = utility.dig_groups("softcobble"),
  368. sounds = default.node_sound_stone_defaults()
  369. })
  370. minetest.register_node("darkage:slate_tile", {
  371. description = "Slate Tile",
  372. tiles = {"darkage_slate_tile.png"},
  373. paramtype2 = "facedir",
  374. groups = utility.dig_groups("cobble"),
  375. sounds = default.node_sound_stone_defaults()
  376. })
  377. minetest.register_node("darkage:slate_block", {
  378. description = "Slate Block",
  379. tiles = {"darkage_slate_block.png"},
  380. groups = utility.dig_groups("block", {block=1}),
  381. sounds = default.node_sound_stone_defaults()
  382. })
  383. minetest.register_node("darkage:slate_brick", {
  384. description = "Slate Brick",
  385. tiles = {"darkage_slate_brick.png"},
  386. paramtype2 = "facedir",
  387. groups = utility.dig_groups("brick", {brick=1}),
  388. sounds = default.node_sound_stone_defaults()
  389. })
  390. minetest.register_node("darkage:shale", {
  391. description = "Shale",
  392. tiles = {"darkage_shale.png", "darkage_shale.png", "darkage_shale_side.png"},
  393. groups = utility.dig_groups("softstone"),
  394. sounds = default.node_sound_stone_defaults()
  395. })
  396. minetest.register_node("darkage:ors", {
  397. description = "Old Red Sandstone",
  398. tiles = {"darkage_ors.png"},
  399. drop = "darkage:ors_rubble",
  400. groups = utility.dig_groups("stone"),
  401. sounds = default.node_sound_stone_defaults()
  402. })
  403. minetest.register_node("darkage:ors_rubble", {
  404. description = "Old Red Sandstone Rubble",
  405. tiles = {"darkage_ors_rubble.png"},
  406. groups = utility.dig_groups("softcobble", {stone = 1}),
  407. sounds = default.node_sound_stone_defaults()
  408. })
  409. minetest.register_node("darkage:ors_brick", {
  410. description = "Old Red Sandstone Brick",
  411. tiles = {"darkage_ors_brick.png"},
  412. paramtype2 = "facedir",
  413. groups = utility.dig_groups("brick", {brick=1}),
  414. sounds = default.node_sound_stone_defaults()
  415. })
  416. minetest.register_node("darkage:ors_block", {
  417. description = "Old Red Sandstone Block",
  418. tiles = {"darkage_ors_block.png"},
  419. groups = utility.dig_groups("block", {stone = 2}),
  420. sounds = default.node_sound_stone_defaults()
  421. })
  422. minetest.register_node("darkage:tuff", {
  423. description = "Tuff",
  424. tiles = {"darkage_tuff.png"},
  425. groups = utility.dig_groups("cobble", {stone = 1}),
  426. drop = 'darkage:tuff_rubble',
  427. sounds = default.node_sound_stone_defaults()
  428. })
  429. minetest.register_node("darkage:tuff_bricks", {
  430. description = "Tuff Bricks",
  431. tiles = {"darkage_tuff_bricks.png"},
  432. paramtype2 = "facedir",
  433. groups = utility.dig_groups("brick", {brick=1}),
  434. sounds = default.node_sound_stone_defaults()
  435. })
  436. minetest.register_node("darkage:tuff_rubble", {
  437. description = "Tuff Rubble",
  438. tiles = {"darkage_tuff_rubble.png"},
  439. groups = utility.dig_groups("cobble", {falling_node = 1}),
  440. sounds = default.node_sound_gravel_defaults(),
  441. })
  442. minetest.register_node("darkage:old_tuff_bricks", {
  443. description = "Old Tuff Bricks",
  444. tiles = {"darkage_old_tuff_bricks.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:rhyolitic_tuff", {
  450. description = "Rhyolitic Tuff",
  451. tiles = {"darkage_rhyolitic_tuff.png"},
  452. groups = utility.dig_groups("cobble", {stone = 1}),
  453. drop = 'darkage:rhyolitic_tuff_rubble',
  454. sounds = default.node_sound_stone_defaults()
  455. })
  456. minetest.register_node("darkage:rhyolitic_tuff_rubble", {
  457. description = "Rhyolitic Tuff Rubble",
  458. tiles = {"darkage_rhyolitic_tuff_rubble.png"},
  459. groups = utility.dig_groups("softcobble", {falling_node = 1}),
  460. sounds = default.node_sound_gravel_defaults(),
  461. })
  462. minetest.register_node("darkage:rhyolitic_tuff_bricks", {
  463. description = "Rhyolitic Tuff Bricks",
  464. tiles = {"darkage_rhyolitic_tuff_bricks.png"},
  465. paramtype2 = "facedir",
  466. groups = utility.dig_groups("brick", {brick=1}),
  467. sounds = default.node_sound_stone_defaults()
  468. })
  469. minetest.register_node("darkage:basaltic", {
  470. description = "Dark Basaltic Rock",
  471. tiles = {"darkage_basalt.png"},
  472. drop = "darkage:basaltic_rubble",
  473. groups = utility.dig_groups("hardstone", {stone = 1}),
  474. sounds = default.node_sound_stone_defaults(),
  475. movement_speed_multiplier = default.ROAD_SPEED,
  476. })
  477. minetest.register_node("darkage:basaltic_rubble", {
  478. description = "Dark Basaltic Rubble",
  479. tiles = {"darkage_basalt_rubble.png"},
  480. groups = utility.dig_groups("cobble", {stone = 1}),
  481. sounds = default.node_sound_stone_defaults()
  482. })
  483. minetest.register_node("darkage:basaltic_brick", {
  484. description = "Dark Basaltic Brick",
  485. tiles = {"darkage_basalt_brick.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:basaltic_block", {
  491. description = "Dark Basaltic Block",
  492. tiles = {"darkage_basalt_block.png"},
  493. groups = utility.dig_groups("block", {block=1}),
  494. sounds = default.node_sound_stone_defaults()
  495. })
  496. minetest.register_node("darkage:box", {
  497. description = "Wooden Box",
  498. tiles = {
  499. "darkage_box_top.png",
  500. "darkage_box_top.png",
  501. "darkage_box.png",
  502. },
  503. groups = utility.dig_groups("furniture"),
  504. sounds = default.node_sound_wood_defaults(),
  505. on_rightclick = function(...)
  506. return darkage.on_rightclick(...)
  507. end,
  508. on_construct = function(...)
  509. return darkage.on_construct(...)
  510. end,
  511. after_place_node = function(...)
  512. return darkage.after_place_node(...)
  513. end,
  514. can_dig = function(...)
  515. return darkage.can_dig(...)
  516. end,
  517. allow_metadata_inventory_move = function(...)
  518. return darkage.allow_metadata_inventory_move(...)
  519. end,
  520. allow_metadata_inventory_put = function(...)
  521. return darkage.allow_metadata_inventory_put(...)
  522. end,
  523. allow_metadata_inventory_take = function(...)
  524. return darkage.allow_metadata_inventory_take(...)
  525. end,
  526. on_metadata_inventory_move = function(...)
  527. return darkage.on_metadata_inventory_move(...)
  528. end,
  529. on_metadata_inventory_put = function(...)
  530. return darkage.on_metadata_inventory_put(...)
  531. end,
  532. on_metadata_inventory_take = function(...)
  533. return darkage.on_metadata_inventory_take(...)
  534. end,
  535. on_blast = function(...)
  536. return darkage.on_blast(...)
  537. end,
  538. })
  539. minetest.register_node("darkage:wood_shelves", {
  540. description = "Wooden Shelf",
  541. tiles = {
  542. "darkage_shelves.png",
  543. "darkage_shelves.png",
  544. "darkage_shelves.png",
  545. "darkage_shelves.png",
  546. "darkage_shelves.png",
  547. "darkage_shelves_front.png",
  548. },
  549. paramtype2 = "facedir",
  550. groups = utility.dig_groups("furniture"),
  551. sounds = default.node_sound_wood_defaults(),
  552. on_rightclick = function(...)
  553. return darkage.on_rightclick(...)
  554. end,
  555. on_construct = function(...)
  556. return darkage.on_construct(...)
  557. end,
  558. after_place_node = function(...)
  559. return darkage.after_place_node(...)
  560. end,
  561. can_dig = function(...)
  562. return darkage.can_dig(...)
  563. end,
  564. allow_metadata_inventory_move = function(...)
  565. return darkage.allow_metadata_inventory_move(...)
  566. end,
  567. allow_metadata_inventory_put = function(...)
  568. return darkage.allow_metadata_inventory_put(...)
  569. end,
  570. allow_metadata_inventory_take = function(...)
  571. return darkage.allow_metadata_inventory_take(...)
  572. end,
  573. on_metadata_inventory_move = function(...)
  574. return darkage.on_metadata_inventory_move(...)
  575. end,
  576. on_metadata_inventory_put = function(...)
  577. return darkage.on_metadata_inventory_put(...)
  578. end,
  579. on_metadata_inventory_take = function(...)
  580. return darkage.on_metadata_inventory_take(...)
  581. end,
  582. on_blast = function(...)
  583. return darkage.on_blast(...)
  584. end,
  585. })
  586. minetest.register_on_player_receive_fields(function(...)
  587. return darkage.on_player_receive_fields(...)
  588. end)
  589. -- Register mod as reloadable.
  590. local c = "darkage:core"
  591. local f = darkage.modpath .. "/init.lua"
  592. reload.register_file(c, f, false)
  593. darkage.run_once = true
  594. end