unlocked.lua 914 B

12345678910111213141516171819202122232425262728293031323334353637
  1. local cdoor_list = { --Number , Description , Inven Image , Image
  2. { "1", "Bronze Door" , "bronze", "bronze_ingot"},
  3. { "2", "Copper Door" , "copper", "copper_ingot"},
  4. { "3", "Gold Door" , "gold", "gold_ingot"},
  5. { "4", "Diamond Door" , "diamond", "diamond"},
  6. { "5", "Mese Door" , "mese", "mese_crystal"},
  7. }
  8. for i in ipairs(cdoor_list) do
  9. local num = cdoor_list[i][1]
  10. local desc = cdoor_list[i][2]
  11. local img = cdoor_list[i][3]
  12. local itm = cdoor_list[i][4]
  13. doors.register_door("my_default_doors:door"..num, {
  14. description = desc,
  15. inventory_image = "mydoors_"..img.."_inv.png",
  16. groups = {choppy=2,cracky=2,door=1},
  17. tiles = {{name="mydoors_"..img..".png", backface_culling = true}},
  18. protected = false,
  19. })
  20. -- Crafts
  21. minetest.register_craft({
  22. output = "my_default_doors:door"..num.." 1",
  23. recipe = {
  24. {"", "", ""},
  25. {"default:"..itm, "doors:door_steel", "default:"..itm},
  26. {"", "", ""}
  27. }
  28. })
  29. end