locked.lua 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. local cdoor_list = { --Number , Description , Inven Image , Image
  2. { "1", "Old Door 1" , "old1"},
  3. { "2", "Old Door 2" , "old2"},
  4. { "3", "Old Door 3" , "old3"},
  5. { "4", "Old Door 4" , "old4"},
  6. }
  7. for i in ipairs(cdoor_list) do
  8. local num = cdoor_list[i][1]
  9. local desc = cdoor_list[i][2]
  10. local img = cdoor_list[i][3]
  11. doors.register_door("my_old_doors:door"..num.."_locked", {
  12. description = desc.." Locked",
  13. inventory_image = "mydoors_"..img.."_inv.png",
  14. groups = {choppy=2,cracky=2,door=1},
  15. tiles = {{ name = "mydoors_"..img..".png", backface_culling = true }},
  16. protected = true,
  17. })
  18. end
  19. -- Crafts
  20. minetest.register_craft({
  21. output = "my_old_doors:door1_locked 1",
  22. recipe = {
  23. {"default:glass", "my_door_wood:wood_yellow", ""},
  24. {"my_door_wood:wood_yellow", "my_door_wood:wood_yellow", "default:steel_ingot"},
  25. {"my_door_wood:wood_yellow", "my_door_wood:wood_yellow", ""}
  26. }
  27. })
  28. minetest.register_craft({
  29. output = "my_old_doors:door2_locked 1",
  30. recipe = {
  31. {"default:glass", "my_door_wood:wood_red", ""},
  32. {"my_door_wood:wood_red", "my_door_wood:wood_red", "default:steel_ingot"},
  33. {"my_door_wood:wood_red", "my_door_wood:wood_red", ""}
  34. }
  35. })
  36. minetest.register_craft({
  37. output = "my_old_doors:door3_locked 1",
  38. recipe = {
  39. {"default:glass", "my_door_wood:wood_grey", ""},
  40. {"my_door_wood:wood_grey", "my_door_wood:wood_grey", "default:steel_ingot"},
  41. {"my_door_wood:wood_grey", "my_door_wood:wood_grey", ""}
  42. }
  43. })
  44. minetest.register_craft({
  45. output = "my_old_doors:door4_locked 1",
  46. recipe = {
  47. {"my_door_wood:wood_red", "my_door_wood:wood_red", ""},
  48. {"my_door_wood:wood_red", "dye:black", "default:steel_ingot"},
  49. {"my_door_wood:wood_red", "my_door_wood:wood_red", ""}
  50. }
  51. })