init.lua 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. -- Kalite: a coal substitute.
  2. minetest.register_node("kalite:ore", {
  3. description = "Kalite Ore",
  4. tiles = {"default_stone.png^gloopores_mineral_kalite.png"},
  5. groups = utility.dig_groups("mineral"),
  6. drop = {
  7. max_items = 4,
  8. items = {
  9. {
  10. items = {'kalite:lump'},
  11. rarity = 5,
  12. },
  13. {
  14. items = {'kalite:lump'},
  15. rarity = 2,
  16. },
  17. {
  18. items = {'kalite:lump 2'},
  19. },
  20. }
  21. },
  22. sounds = default.node_sound_stone_defaults(),
  23. silverpick_drop = true,
  24. -- Digging kalite has a chance to release poison gas.
  25. after_dig_node = function(pos, oldnode, oldmetadata, digger)
  26. if pos.y < -1024 then
  27. if math.random(1, 300) == 1 then
  28. breath.spawn_gas(pos)
  29. end
  30. end
  31. end,
  32. })
  33. oregen.register_ore({
  34. ore_type = "scatter",
  35. ore = "kalite:ore",
  36. wherein = "default:stone",
  37. clust_scarcity = 8*8*8,
  38. clust_num_ores = 2,
  39. clust_size = 3,
  40. y_min = -25000,
  41. y_max = 300,
  42. })
  43. minetest.register_craftitem("kalite:lump", {
  44. description = "Kalite Lump",
  45. inventory_image = "gloopores_kalite_lump.png",
  46. })
  47. minetest.register_craftitem("kalite:dust", {
  48. description = "Kalite Dust",
  49. inventory_image = "technic_kalite_dust.png"
  50. })
  51. minetest.register_craft({
  52. type = "grinding",
  53. output = 'kalite:dust 2',
  54. recipe = 'kalite:lump',
  55. time = 10,
  56. })
  57. minetest.register_craftitem("kalite:ingot", {
  58. description = "Compressed Kalite",
  59. inventory_image = "glooptest_compressed_kalite.png",
  60. -- Intentionally NOT in `ingot` group, because it's not metalic.
  61. })
  62. minetest.register_craft({
  63. type = "compressing",
  64. output = "kalite:ingot",
  65. recipe = "kalite:lump 4",
  66. time = 10,
  67. })
  68. minetest.register_craft({
  69. type = "compressing",
  70. output = "kalite:ingot",
  71. recipe = "kalite:dust 8",
  72. time = 10,
  73. })
  74. minetest.register_craft({
  75. type = "grinding",
  76. output = 'kalite:dust 8',
  77. recipe = 'kalite:ingot',
  78. time = 10,
  79. })
  80. minetest.register_craft({
  81. type = "shapeless",
  82. output = 'kalite:dust',
  83. recipe = {'kalite:lump', 'kalite:lump'}
  84. })
  85. minetest.register_craft({
  86. type = "fuel",
  87. recipe = "kalite:lump",
  88. burntime = 40,
  89. })
  90. minetest.register_craft({
  91. type = "coalfuel",
  92. recipe = "kalite:lump",
  93. burntime = 40,
  94. })
  95. minetest.register_craft({
  96. type = "fuel",
  97. recipe = "kalite:ingot",
  98. burntime = 220, -- A bit more than 40*4, and more than burning dusts.
  99. })
  100. minetest.register_craft({
  101. type = "coalfuel",
  102. recipe = "kalite:ingot",
  103. burntime = 220, -- A bit more than 40*4, and more than burning dusts.
  104. })
  105. minetest.register_craft({
  106. type = "fuel",
  107. recipe = "kalite:dust",
  108. burntime = 25, -- A bit more than 1/2 of lump's burntime.
  109. -- This makes it better to burn kalite dust than kalite lumps.
  110. })
  111. minetest.register_craft({
  112. type = "coalfuel",
  113. recipe = "kalite:dust",
  114. burntime = 25, -- A bit more than 1/2 of lump's burntime.
  115. -- This makes it better to burn kalite dust than kalite lumps.
  116. })
  117. minetest.register_craft({
  118. type = "shapeless",
  119. output = "dye:red",
  120. recipe = {"kalite:dust"},
  121. })