init.lua 415 B

123456789101112131415161718192021222324252627
  1. local modpath = minetest.get_modpath("morecrops")
  2. morecrops = {}
  3. dofile(modpath.."/croplist.lua")
  4. dofile(modpath.."/annuals.lua")
  5. dofile(modpath.."/grains.lua")
  6. for i in ipairs(morecrops.crops) do
  7. local type = morecrops.crops[i].type
  8. if type == "annual" then
  9. morecrops.register_annual(morecrops.crops[i])
  10. elseif type == "grain" then
  11. morecrops.register_grain(morecrops.crops[i])
  12. end
  13. end