locked.lua 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. local mdoor_list = { --Number , Description , Inven Image , Image
  2. -- {"Misc Door 1" , "door1"},
  3. -- {"Misc Door 2" , "door2"},
  4. {"Misc Door 3" , "door3"},
  5. {"Misc Door 4" , "door4"},
  6. -- {"Misc Door 5" , "door5"},
  7. }
  8. for i in ipairs(mdoor_list) do
  9. local desc = mdoor_list[i][1]
  10. local img = mdoor_list[i][2]
  11. doors.register_door("my_misc_doors:"..img.."_locked", {
  12. description = desc.." Locked",
  13. inventory_image = "mymdoors_"..img.."_inv.png",
  14. groups = {choppy=2,cracky=2,door=1},
  15. tiles = {{name="mymdoors_"..img..".png", backface_culling = true }},
  16. protected = true,
  17. })
  18. end
  19. -- Crafts
  20. minetest.register_craft({
  21. output = "my_misc_doors:door1_locked 1",
  22. recipe = {
  23. {"my_door_wood:wood_white", "my_door_wood:wood_white", ""},
  24. {"my_door_wood:wood_white", "my_door_wood:wood_white", "default:steel_ingot"},
  25. {"my_door_wood:wood_white", "my_door_wood:wood_white", ""}
  26. }
  27. })
  28. minetest.register_craft({
  29. output = "my_misc_doors:door2_locked 1",
  30. recipe = {
  31. {"my_door_wood:wood_grey", "my_door_wood:wood_grey", ""},
  32. {"my_door_wood:wood_grey", "my_door_wood:wood_grey", "default:steel_ingot"},
  33. {"my_door_wood:wood_grey", "my_door_wood:wood_grey", ""}
  34. }
  35. })
  36. minetest.register_craft({
  37. output = "my_misc_doors:door3_locked 1",
  38. recipe = {
  39. {"default:stone", "default:stone", ""},
  40. {"default:stone", "default:stone", "default:steel_ingot"},
  41. {"default:stone", "default:stone", ""}
  42. }
  43. })
  44. minetest.register_craft({
  45. output = "my_misc_doors:door4_locked 1",
  46. recipe = {
  47. {"default:cobble", "default:cobble", ""},
  48. {"default:cobble", "default:cobble", "default:steel_ingot"},
  49. {"default:cobble", "default:cobble", ""}
  50. }
  51. })
  52. minetest.register_craft({
  53. output = "my_misc_doors:door5_locked 1",
  54. recipe = {
  55. {"my_door_wood:wood_white", "wool:red", ""},
  56. {"my_door_wood:wood_white", "my_door_wood:wood_white", "default:steel_ingot"},
  57. {"my_door_wood:wood_white", "wool:red", ""}
  58. }
  59. })
  60. minetest.register_craft({
  61. output = "my_misc_doors:door6_locked 1",
  62. recipe = {
  63. {"default:steel_ingot", "default:iron_lump", ""},
  64. {"default:steel_ingot", "default:iron_lump", "default:steel_ingot"},
  65. {"default:steel_ingot", "default:iron_lump", ""}
  66. }
  67. })