crafts.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. minetest.register_craft({
  2. output = "morechests:woodchest_public",
  3. recipe = {
  4. {"group:wood_dark", "group:wood_dark", "group:wood_dark"},
  5. {"group:wood_dark", "", "group:wood_dark"},
  6. {"group:wood_dark", "group:wood_dark", "group:wood_dark"},
  7. }
  8. })
  9. minetest.register_craft({
  10. output = "morechests:woodchest_locked",
  11. recipe = {
  12. {"group:wood_dark", "group:wood_dark", "group:wood_dark"},
  13. {"group:wood_dark", "default:padlock", "group:wood_dark"},
  14. {"group:wood_dark", "group:wood_dark", "group:wood_dark"},
  15. }
  16. })
  17. minetest.register_craft( {
  18. type = "shapeless",
  19. output = "morechests:woodchest_locked",
  20. recipe = {"morechests:woodchest", "default:padlock"},
  21. })
  22. -- Helper function to reduce code duplication.
  23. local register_metal_chest = function(ingot, chestpublic, chestlocked)
  24. minetest.register_craft({
  25. output = chestpublic,
  26. recipe = {
  27. {ingot, ingot, ingot},
  28. {ingot, "morechests:woodchest_public", ingot},
  29. {ingot, ingot, ingot},
  30. }
  31. })
  32. minetest.register_craft({
  33. output = chestpublic,
  34. recipe = {
  35. {ingot, ingot, ingot},
  36. {ingot, "chests:chest_public", ingot},
  37. {ingot, ingot, ingot},
  38. }
  39. })
  40. minetest.register_craft({
  41. output = chestlocked,
  42. recipe = {
  43. {ingot, ingot, ingot},
  44. {ingot, "morechests:woodchest_locked", ingot},
  45. {ingot, ingot, ingot},
  46. }
  47. })
  48. minetest.register_craft({
  49. output = chestlocked,
  50. recipe = {
  51. {ingot, ingot, ingot},
  52. {ingot, "chests:chest_locked", ingot},
  53. {ingot, ingot, ingot},
  54. }
  55. })
  56. minetest.register_craft( {
  57. type = "shapeless",
  58. output = chestlocked,
  59. recipe = {chestpublic, "default:padlock"},
  60. })
  61. end
  62. -- Metalic chests crafts.
  63. register_metal_chest("default:copper_ingot", "morechests:copperchest_public", "morechests:copperchest_locked")
  64. register_metal_chest("cast_iron:ingot", "morechests:ironchest_public", "morechests:ironchest_locked")
  65. register_metal_chest("default:gold_ingot", "morechests:goldchest_public", "morechests:goldchest_locked")
  66. register_metal_chest("moreores:silver_ingot", "morechests:silverchest_public", "morechests:silverchest_locked")
  67. register_metal_chest("moreores:mithril_ingot", "morechests:mithrilchest_public", "morechests:mithrilchest_locked")
  68. register_metal_chest("default:diamond", "morechests:diamondchest_public", "morechests:diamondchest_locked")