trader_flowers.lua 1015 B

123456789101112131415161718192021222324252627282930313233343536
  1. if( minetest.get_modpath("flowers") ~= nil ) then
  2. local flowers = {
  3. "flowers:rose",
  4. "flowers:tulip",
  5. "flowers:dandelion_yellow",
  6. "flowers:dandelion_white",
  7. "flowers:geranium",
  8. "flowers:viola",
  9. "default:junglegrass",
  10. "default:grass_1",
  11. "default:sapling",
  12. "default:junglesapling",
  13. "default:dry_shrub",
  14. }
  15. local goods = {};
  16. for i,v in ipairs( flowers ) do
  17. table.insert( goods, { v.." 3", "default:steel_ingot", "default:copper_ingot"});
  18. end
  19. table.insert( goods, { "default:cactus 16", "default:steel_ingot", "default:copper_ingot"});
  20. table.insert( goods, { "default:papyrus 16", "default:steel_ingot", "default:copper_ingot"});
  21. table.insert( goods, { "default:seed_wheat 1", "default:steel_ingot", "default:copper_ingot"});
  22. table.insert( goods, { "default:seed_cotton 1", "default:steel_ingot", "default:copper_ingot"});
  23. mobf_trader.add_trader( mobf_trader.npc_trader_prototype,
  24. "flower trader selling plants",
  25. "flowers",
  26. goods,
  27. { "Gert" },
  28. ""
  29. );
  30. end