init.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. local hdoor_list = { --Number , Description , default image
  2. { "cobble" , "Hidden Cobble Door", "default_cobble"},
  3. { "stone" , "Hidden Stone Door", "default_stone"},
  4. { "wood", "Hidden Wood Door", "default_wood"},
  5. { "stone_brick", "Hidden Stone Brick Door", "default_stone_brick"},
  6. { "brick", "Hidden Brick Door", "default_brick"},
  7. { "desert_cobble", "Hidden Desert Cobble Door", "default_desert_cobble"},
  8. { "furnace", "Hidden Furnace Door" , "mydoors_furnace" , "door7"},
  9. { "chest", "Hidden Chest Door" , "mydoors_chest" , "door8"},
  10. { "bookshelf", "Hidden Bookshelf Door" , "mydoors_bookshelf" , "door9"},
  11. }
  12. for i in ipairs(hdoor_list) do
  13. local img = hdoor_list[i][1]
  14. local desc = hdoor_list[i][2]
  15. --local dimg = hdoor_list[i][3]
  16. doors.register_door("my_hidden_doors:hidden_door"..img, {
  17. description = desc.." Locked",
  18. inventory_image = "mydoors_"..img.."_inv.png",
  19. groups = {choppy=2,cracky=2,door=1},
  20. only_placer_can_open = false,
  21. tiles = {{ name = "mydoors_"..img..".png", backface_culling = true }},
  22. protected = false,
  23. })
  24. end
  25. doors.register_door("my_hidden_doors:hidden_door_grey", {
  26. description = "Grey Door Locked",
  27. inventory_image = "mydoors_grey_inv.png",
  28. groups = {choppy=2,cracky=2,door=1},
  29. tiles = {{ name = "mydoors_grey.png", backface_culling = true }},
  30. protected = false,
  31. })
  32. -- Crafts
  33. minetest.register_craft({
  34. output = "my_hidden_doors:hidden_doorcobble 1",
  35. recipe = {
  36. {"my_hidden_doors:hidden_door_grey", "default:cobble", ""},
  37. {"", "", ""},
  38. {"", "", ""}
  39. }
  40. })
  41. minetest.register_craft({
  42. output = "my_hidden_doors:hidden_doorstone 1",
  43. recipe = {
  44. {"my_hidden_doors:hidden_door_grey", "default:stone", ""},
  45. {"", "", ""},
  46. {"", "", ""}
  47. }
  48. })
  49. minetest.register_craft({
  50. output = "my_hidden_doors:hidden_doorwood 1",
  51. recipe = {
  52. {"my_hidden_doors:hidden_door_grey", "default:wood", ""},
  53. {"", "", ""},
  54. {"", "", ""}
  55. }
  56. })
  57. minetest.register_craft({
  58. output = "my_hidden_doors:hidden_doorstone_brick 1",
  59. recipe = {
  60. {"my_hidden_doors:hidden_door_grey", "default:stonebrick", ""},
  61. {"", "", ""},
  62. {"", "", ""}
  63. }
  64. })
  65. minetest.register_craft({
  66. output = "my_hidden_doors:hidden_doordesert_cobble 1",
  67. recipe = {
  68. {"my_hidden_doors:hidden_door_grey", "default:desert_cobble", ""},
  69. {"", "", ""},
  70. {"", "", ""}
  71. }
  72. })
  73. minetest.register_craft({
  74. output = "my_hidden_doors:hidden_doorfurnace 1",
  75. recipe = {
  76. {"my_hidden_doors:hidden_door_grey", "default:furnace", ""},
  77. {"", "", ""},
  78. {"", "", ""}
  79. }
  80. })
  81. minetest.register_craft({
  82. output = "my_hidden_doors:hidden_doorchest 1",
  83. recipe = {
  84. {"my_hidden_doors:hidden_door_grey", "default:chest", ""},
  85. {"", "", ""},
  86. {"", "", ""}
  87. }
  88. })
  89. minetest.register_craft({
  90. output = "my_hidden_doors:hidden_doorbookshelf 1",
  91. recipe = {
  92. {"my_hidden_doors:hidden_door_grey", "default:bookshelf", ""},
  93. {"", "", ""},
  94. {"", "", ""}
  95. }
  96. })
  97. minetest.register_craft({
  98. output = "my_hidden_doors:hidden_doorbrick 1",
  99. recipe = {
  100. {"my_hidden_doors:hidden_door_grey", "default:brick", ""},
  101. {"", "", ""},
  102. {"", "", ""}
  103. }
  104. })
  105. minetest.register_craft({
  106. output = "my_hidden_doors:hidden_door_grey 1",
  107. recipe = {
  108. {"my_door_wood:wood_dark_grey", "my_door_wood:wood_dark_grey", ""},
  109. {"my_door_wood:wood_dark_grey", "my_door_wood:wood_dark_grey", ""},
  110. {"my_door_wood:wood_dark_grey", "my_door_wood:wood_dark_grey", ""}
  111. }
  112. })