hobbit.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. -- basic hobbit outfit.
  2. -- made from varios flax (multi-color).
  3. -- hasn't got headwear.
  4. local fabric_colors = {
  5. blue = "lottclothes:flax_blue",
  6. brown = "lottclothes:flax_brown",
  7. green = "lottclothes:flax_green",
  8. grey = "lottclothes:flax_grey",
  9. pink = "lottclothes:flax_pink",
  10. red = "lottclothes:flax_red",
  11. white = "lottclothes:flax_white",
  12. yellow = "lottclothes:flax_yellow"
  13. }
  14. local level=2
  15. --per color crafting :)
  16. for color, fabric in pairs(fabric_colors) do
  17. -- shirt (torso)
  18. minetest.register_tool("lottclothes:shirt_hobbit_"..color, {
  19. description = color:gsub("^%l", string.upper).." Hobbit Shirt",
  20. inventory_image = "lottclothes_inv_shirt_hobbit_"..color..".png",
  21. groups = {armor_torso=0, armor_heal=0, clothes=1, clothes_torso=1},
  22. wear = 0
  23. })
  24. minetest.register_craft({
  25. output = "lottclothes:shirt_hobbit_"..color,
  26. recipe = {
  27. {"lottclothes:flax_white", "", "lottclothes:flax_white"},
  28. {fabric, "lottclothes:flax_white", fabric},
  29. {fabric, fabric, fabric}
  30. }
  31. })
  32. minetest.register_craft({
  33. output = 'lottclothes:flaxthread 8',
  34. recipe = {
  35. {'lottclothes:shirt_hobbit_'..color},
  36. }
  37. })
  38. -- shorts(legs)
  39. minetest.register_tool("lottclothes:shorts_hobbit_"..color, {
  40. description = color:gsub("^%l", string.upper).." Hobbit Shorts",
  41. inventory_image = "lottclothes_inv_shorts_hobbit_"..color..".png",
  42. groups = {armor_legs=0, armor_heal=0, clothes=1, clothes_legs=1},
  43. wear = 0
  44. })
  45. minetest.register_craft({
  46. output = "lottclothes:shorts_hobbit_"..color,
  47. recipe = {
  48. {fabric, fabric, fabric},
  49. {fabric, "", fabric},
  50. {"lottclothes:flax_white","" , "lottclothes:flax_white"}
  51. }
  52. })
  53. minetest.register_craft({
  54. output = 'lottclothes:flaxthread 7',
  55. recipe = {
  56. {'lottclothes:shorts_hobbit_'..color},
  57. }
  58. })
  59. -- shoes(feet)
  60. minetest.register_tool("lottclothes:shoes_hobbit_"..color, {
  61. description = color:gsub("^%l", string.upper).." Hobbit Shoes",
  62. inventory_image = "lottclothes_inv_shoes_hobbit_"..color..".png",
  63. groups = {armor_feet=0, armor_heal=0, clothes=1, clothes_feet=1},
  64. wear = 0
  65. })
  66. minetest.register_craft({
  67. output = "lottclothes:shoes_hobbit_"..color,
  68. recipe = {
  69. {fabric, "", fabric},
  70. {"lottclothes:flax_black","" , "lottclothes:flax_black"}
  71. }
  72. })
  73. minetest.register_craft({
  74. output = 'lottclothes:flaxthread 4',
  75. recipe = {
  76. {'lottclothes:shoes_hobbit_'..color},
  77. }
  78. })
  79. -- cloak
  80. minetest.register_tool("lottclothes:cloak_hobbit_"..color, {
  81. description = color:gsub("^%l", string.upper).." Hobbit Cloak",
  82. inventory_image = "lottclothes_inv_cloak_hobbit_"..color..".png",
  83. groups = {armor_heal=0, clothes=1, no_preview = 1, clothes_cloak=1},
  84. wear = 0
  85. })
  86. minetest.register_craft({
  87. output = "lottclothes:cloak_hobbit_"..color,
  88. recipe = {
  89. {fabric, fabric},
  90. {fabric, fabric},
  91. {fabric, fabric}
  92. }
  93. })
  94. minetest.register_craft({
  95. output = 'lottclothes:flaxthread 6',
  96. recipe = {
  97. {'lottclothes:cloak_hobbit_'..color},
  98. }
  99. })
  100. end