slag.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. local forge = ...
  2. local modname = minetest.get_current_modname()
  3. --------------------------------------------------------------------------------
  4. minetest.register_node(modname..":slag", {
  5. description = "Slag",
  6. tiles = { "default_gravel.png^[colorize:brown:80" },
  7. groups = {cracky=3, cobble=1, refractory=1},
  8. sounds = default.node_sound_stone_defaults(),
  9. })
  10. minetest.register_craftitem(modname..":slag_lump", {
  11. description = "Slag Lump",
  12. inventory_image = "default_clay_lump.png^[colorize:brown:80",
  13. })
  14. minetest.register_craft({
  15. output = modname..":slag",
  16. recipe = {
  17. {modname..":slag_lump",modname..":slag_lump",modname..":slag_lump"},
  18. {modname..":slag_lump",modname..":slag_lump",modname..":slag_lump"},
  19. {modname..":slag_lump",modname..":slag_lump",modname..":slag_lump"},
  20. }
  21. })
  22. forge.register_ore(modname..":slag", 600, {
  23. steel = 1,
  24. copper = 1,
  25. glass = 1,
  26. slag = 1000,
  27. })
  28. forge.register_metal({
  29. name="slag",
  30. Name="Slag",
  31. cools=modname..":slag",
  32. ingot=modname..":slag_lump",
  33. ingot_color="brown:80",
  34. density=3,
  35. })
  36. --------------------------------------------------------------------------------
  37. local slag_cement = modname..":slag_cement"
  38. minetest.register_node(slag_cement, {
  39. description = "Slag cement",
  40. tiles = { "default_sand.png^[colorize:#ddeeee:120" },
  41. groups = { crumbly=3, falling_node=1 },
  42. sounds = default.node_sound_sand_defaults(),
  43. })
  44. minetest.register_craft({
  45. type = "cooking",
  46. output = "default:glass", -- Slag glass
  47. recipe = slag_cement,
  48. })
  49. forge.register_ore(modname..":slag_cement", 350, {
  50. steel = 1,
  51. copper = 1,
  52. glass = 100,
  53. slag = 900,
  54. })
  55. if minetest.get_modpath("technic") ~= nil then
  56. technic.register_grinder_recipe({
  57. input = { modname..":slag" },
  58. output = slag_cement
  59. })
  60. minetest.clear_craft({ output = "technic:concrete" })
  61. minetest.register_craft({
  62. output = "technic:concrete 5",
  63. recipe = {
  64. {slag_cement,"technic:rebar",slag_cement},
  65. {"technic:rebar",slag_cement,"technic:rebar"},
  66. {slag_cement,"technic:rebar",slag_cement},
  67. }
  68. })
  69. minetest.clear_craft({ output = "technic:concrete_post" })
  70. minetest.register_craft({
  71. output = "technic:concrete_post 12",
  72. recipe = {
  73. {slag_cement,"technic:rebar",slag_cement},
  74. {slag_cement,"technic:rebar",slag_cement},
  75. {slag_cement,"technic:rebar",slag_cement},
  76. }
  77. })
  78. end
  79. if minetest.get_modpath("gloopblocks") then
  80. minetest.register_craft({
  81. type = "shapeless",
  82. output = "gloopblocks:wet_cement 2",
  83. recipe = { "bucket:bucket_water", slag_cement, slag_cement },
  84. replacements = {{"bucket:bucket_water", "bucket:bucket_empty"},},
  85. })
  86. end
  87. if minetest.get_modpath("prefab") then
  88. minetest.register_craft({
  89. output = "prefab:concrete 5",
  90. recipe = {
  91. {slag_cement, "default:gravel", slag_cement},
  92. {"default:gravel", slag_cement, "default:gravel"},
  93. {slag_cement, "default:gravel", slag_cement},
  94. }
  95. })
  96. end