clothing.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. local S = cannabis.S
  2. local path = cannabis.path
  3. local Color_list = {
  4. { "hemp", "c"},
  5. { "u_style", "u"},
  6. { "red_hemp", "cr"},
  7. { "ice_hemp", "ci"},
  8. { "fabric_hemp", "t"},
  9. { "jamaican", "jam"}
  10. }
  11. local craftitem ={
  12. --{"cape"},
  13. {"skullcap"},
  14. {"glove_right"},
  15. {"glove_left"},
  16. {"gloves"},
  17. {"shirt"},
  18. {"shorts"},
  19. {"shortshirt"},
  20. {"undershirt"},
  21. {"hood_mask"},
  22. {"pants"}
  23. }
  24. local colors_l ={
  25. --{"col"},
  26. {"yellow"},
  27. {"red"},
  28. {"cyan"},
  29. {"pink"},
  30. {"orange"},
  31. {"green"},
  32. {"white"},
  33. {"green"},
  34. {"violet"},
  35. {"blue"}
  36. }
  37. for i in ipairs(Color_list) do
  38. local colordesc = Color_list[i][1]
  39. local color = Color_list[i][2]
  40. for i in ipairs(craftitem) do
  41. local item = craftitem[i][1]
  42. -- local col= craftitem[i][2]
  43. for i in ipairs(colors_l) do
  44. -- local item = craftitem[i][1]
  45. local colit= colors_l[i][1]
  46. minetest.register_craftitem("cannabis:canapa_"..item.."_fabric_hemp_"..colit, {
  47. description = S(item.." fabric_hemp "..colit),
  48. inventory_image = "clothing_inv_"..item.."_t.png^"..colit..".png",
  49. uv_image = "clothing_uv_"..item.."_t.png^"..colit..".png",
  50. groups = {clothing=1},
  51. })
  52. minetest.register_craftitem("cannabis:canapa_"..item.."_"..colordesc, {
  53. description = S(item.." "..colordesc),
  54. inventory_image = "clothing_inv_"..item.."_"..color..".png",
  55. uv_image = "clothing_uv_"..item.."_"..color..".png",
  56. groups = {clothing=1},
  57. })
  58. minetest.register_craftitem("cannabis:canapa_cape_"..colordesc, {
  59. description = S(item.." "..colordesc),
  60. inventory_image = "clothing_inv_cape_"..color..".png",
  61. uv_image = "clothing_uv_cape_"..color..".png",
  62. groups = {cape=1},
  63. })
  64. minetest.register_craftitem("cannabis:canapa_cape_fabric_hemp_"..colit, {
  65. description = S(item.." fabric_hemp "..colit),
  66. inventory_image = "clothing_inv_cape_t.png^"..colit..".png",
  67. uv_image = "clothing_uv_cape_t.png^"..colit..".png",
  68. groups = {cape=1},
  69. })
  70. end
  71. end
  72. end
  73. --________________________________________________________
  74. --______________________________TODO
  75. --[[
  76. clothing.spinning_machine:recipe_register_input(
  77. "cannabis:canapa_fiber",
  78. {
  79. inputs = 1,
  80. outputs = {"cannabis:canapa_spool"},
  81. production_time = 30,
  82. consumption_step_size = 1,
  83. });
  84. clothing.loom:recipe_register_input(
  85. "",
  86. {
  87. inputs = {"cannabis:canapa_spool", "cannabis:canapa_spool",
  88. "cannabis:canapa_spool", "cannabis:canapa_spool",
  89. },
  90. outputs = {{"cannabis:canapa_cloth","clothing:yarn_spool_empty 4"},},
  91. production_time = 30,
  92. consumption_step_size = 1,
  93. });
  94. ]]