init.lua 1.1 KB

123456789101112131415161718192021222324252627
  1. local modpath = minetest.get_modpath(minetest.get_current_modname())
  2. local S = minetest.get_translator("carpets")
  3. dofile(modpath .. "/api.lua")
  4. if minetest.get_modpath("wool") then
  5. local nodes = {
  6. {name="wool:black", description=S("Black Carpet")},
  7. {name="wool:blue", description=S("Blue Carpet")},
  8. {name="wool:brown", description=S("Brown Carpet")},
  9. {name="wool:cyan", description=S("Cyan Carpet")},
  10. {name="wool:dark_green", description=S("Dark Green Carpet")},
  11. {name="wool:dark_grey", description=S("Dark Grey Carpet")},
  12. {name="wool:green", description=S("Green Carpet")},
  13. {name="wool:grey", description=S("Grey Carpet")},
  14. {name="wool:magenta", description=S("Magenta Carpet")},
  15. {name="wool:orange", description=S("Orange Carpet")},
  16. {name="wool:pink", description=S("Pink Carpet")},
  17. {name="wool:red", description=S("Red Carpet")},
  18. {name="wool:violet", description=S("Violet Carpet")},
  19. {name="wool:white", description=S("White Carpet")},
  20. {name="wool:yellow", description=S("Yellow Carpet")},
  21. }
  22. for _, node in ipairs(nodes) do
  23. carpets.register(node.name, {description=node.description})
  24. end
  25. end