init.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. dofile(minetest.get_modpath("doors").."/functions.lua")
  2. doors:register_door("doors:door_wood", {
  3. description = "Wooden Door",
  4. inventory_image = "doors_wood_b.png",
  5. groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1},
  6. tiles = {"doors_wood_b.png"},
  7. })
  8. minetest.register_craft({
  9. output = "doors:door_wood_1 2",
  10. recipe = {
  11. {"group:wood", "group:wood"},
  12. {"group:wood", "group:wood"},
  13. {"group:wood", "group:wood"}
  14. }
  15. })
  16. doors:register_door("doors:door_wood_window", {
  17. description = "Wooden Window",
  18. inventory_image = "doors_wood_a.png",
  19. groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1},
  20. tiles = {"doors_wood_a.png"},
  21. })
  22. minetest.register_craft({
  23. output = "doors:door_wood_window_1 2",
  24. recipe = {
  25. {"group:wood", "group:wood"},
  26. {"group:stick", "group:stick"},
  27. {"group:wood", "group:wood"}
  28. }
  29. })
  30. doors:register_door("doors:door_steel", {
  31. description = "Steel Door",
  32. inventory_image = "doors_steel_b.png",
  33. groups = {snappy=1, cracky=1, door=1},
  34. tiles = {"doors_steel_b.png"},
  35. only_placer_can_open = true,
  36. })
  37. minetest.register_craft({
  38. output = "doors:door_steel 2",
  39. recipe = {
  40. {"default:steel_ingot", "default:steel_ingot"},
  41. {"default:steel_ingot", "default:steel_ingot"},
  42. {"default:steel_ingot", "default:steel_ingot"}
  43. }
  44. })
  45. doors:register_door("doors:steel_bars", {
  46. description = "Steel Bars",
  47. inventory_image = "doors_steel_bars.png",
  48. groups = {snappy=1, cracky=1, door=1},
  49. tiles = {"doors_steel_bars.png"},
  50. only_placer_can_open = true,
  51. })
  52. minetest.register_craft({
  53. output = "doors:steel_bars_1 2",
  54. recipe = {
  55. {"default:steel_ingot", "default:steel_ingot"},
  56. {"default:stick", "default:stick"},
  57. {"default:steel_ingot", "default:steel_ingot"}
  58. }
  59. })
  60. doors:register_door("doors:door_glass", {
  61. description = "Glass Door",
  62. inventory_image = "default_glass.png",
  63. groups = {oddly_breakable_by_hand=3, door=1},
  64. tiles = {"default_glass.png"},
  65. })
  66. minetest.register_craft({
  67. output = "doors:door_glass_1 2",
  68. recipe = {
  69. {"default:glass", "default:glass"},
  70. {"default:glass", "default:glass"},
  71. {"default:glass", "default:glass"}
  72. }
  73. })
  74. minetest.register_alias("doors:door_wood", "doors:door_wood_1")
  75. minetest.register_alias("doors:door_wood_t_1", "doors:door_wood_window_1")
  76. minetest.register_alias("doors:door_wood_t_2", "doors:door_wood_window_2")
  77. minetest.register_alias("doors:door_wood_b_1", "doors:door_wood_1")
  78. minetest.register_alias("doors:door_wood_b_2", "doors:door_wood_2")
  79. minetest.register_alias("doors:door_steel", "doors:door_steel_1")
  80. minetest.register_alias("doors:door_steel_t_1", "doors:door_steel_1")
  81. minetest.register_alias("doors:door_steel_t_2", "doors:door_steel_2")
  82. minetest.register_alias("doors:door_steel_b_1", "doors:door_steel_1")
  83. minetest.register_alias("doors:door_steel_b_2", "doors:door_steel_2")