fabricandthread.lua 772 B

1234567891011121314151617181920212223242526
  1. local dye_table = dye.dyes
  2. for i in ipairs(dye_table) do
  3. local name = dye_table[i][1]
  4. local desc = dye_table[i][2]
  5. local hex = dye_table[i][3]
  6. minetest.register_craftitem('furniture:fabric_'..name, {
  7. description = (desc..' Fabric'),
  8. inventory_image = 'furniture_fabric.png^[multiply:'..hex,
  9. groups = {fabric=1}
  10. })
  11. minetest.register_craftitem('furniture:thread_'..name, {
  12. description = (desc..' Spool of Thread'),
  13. inventory_image = '(furniture_thread.png^[multiply:'..hex..')^furniture_thread_mask.png',
  14. groups = {thread=1}
  15. })
  16. minetest.register_craftitem('furniture:cushion_'..name, {
  17. description = (desc..' Cushion'),
  18. inventory_image = 'furniture_cushion_pad_inv.png^[multiply:'..hex,
  19. })
  20. end