unlocked.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. local fdoor_list = { --Number , Description , Inven Image , Image
  2. -- {"Fancy Door 1" , "door1"},
  3. {"Fancy Door 2" , "door2"},
  4. {"Fancy Door 3" , "door3"},
  5. -- {"Fancy Door 4" , "door4"},
  6. -- {"Fancy Door 5" , "door5"},
  7. -- {"Fancy Door 6" , "door6"},
  8. -- {"Fancy Door 7" , "door7"},
  9. -- {"Fancy Door 8" , "door8"},
  10. }
  11. for i in ipairs(fdoor_list) do
  12. local desc = fdoor_list[i][1]
  13. local img = fdoor_list[i][2]
  14. doors.register_door("my_fancy_doors:"..img, {
  15. description = desc,
  16. inventory_image = "myfdoors_"..img.."_inv.png",
  17. groups = {choppy=2,cracky=2,door=1},
  18. tiles = {{ name = "myfdoors_"..img..".png", backface_culling = true }},
  19. protected = false,
  20. })
  21. end
  22. -- Crafts
  23. minetest.register_craft({
  24. output = "my_fancy_doors:door1 1",
  25. recipe = {
  26. {"my_door_wood:wood_yellow", "default:glass", ""},
  27. {"my_door_wood:wood_yellow", "my_door_wood:wood_yellow", ""},
  28. {"my_door_wood:wood_yellow", "default:glass", ""}
  29. }
  30. })
  31. minetest.register_craft({
  32. output = "my_fancy_doors:door2 1",
  33. recipe = {
  34. {"my_door_wood:wood_yellow", "default:glass", ""},
  35. {"my_door_wood:wood_yellow", "default:steel_ingot", ""},
  36. {"my_door_wood:wood_yellow", "default:glass", ""}
  37. }
  38. })
  39. minetest.register_craft({
  40. output = "my_fancy_doors:door3 1",
  41. recipe = {
  42. {"my_door_wood:wood_white", "default:glass", ""},
  43. {"my_door_wood:wood_white", "my_door_wood:wood_white", ""},
  44. {"my_door_wood:wood_white", "default:glass", ""}
  45. }
  46. })
  47. minetest.register_craft({
  48. output = "my_fancy_doors:door4 1",
  49. recipe = {
  50. {"my_door_wood:wood_red", "my_door_wood:wood_dark_grey", ""},
  51. {"my_door_wood:wood_red", "my_door_wood:wood_red", ""},
  52. {"my_door_wood:wood_red", "my_door_wood:wood_dark_grey", ""}
  53. }
  54. })