init.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. throwing = {}
  2. throwing_arrows = {
  3. {"throwing:arrow_steel", "throwing:arrow_steel_entity"},
  4. {"throwing:arrow_stone", "throwing:arrow_stone_entity"},
  5. {"throwing:arrow_obsidian", "throwing:arrow_obsidian_entity"},
  6. {"throwing:arrow_fire", "throwing:arrow_fire_entity"},
  7. {"throwing:arrow_teleport", "throwing:arrow_teleport_entity"},
  8. {"throwing:arrow_dig", "throwing:arrow_dig_entity"},
  9. {"throwing:arrow_build", "throwing:arrow_build_entity"},
  10. {"throwing:arrow_tnt", "throwing:arrow_tnt_entity"},
  11. {"throwing:arrow_torch", "throwing:arrow_torch_entity"},
  12. {"throwing:arrow_diamond", "throwing:arrow_diamond_entity"},
  13. {"throwing:arrow_shell", "throwing:arrow_shell_entity"},
  14. {"throwing:arrow_fireworks_blue", "throwing:arrow_fireworks_blue_entity"},
  15. {"throwing:arrow_fireworks_red", "throwing:arrow_fireworks_red_entity"},
  16. }
  17. dofile(minetest.get_modpath("throwing").."/defaults.lua")
  18. local input = io.open(minetest.get_modpath("throwing").."/throwing.conf", "r")
  19. if input then
  20. dofile(minetest.get_modpath("throwing").."/throwing.conf")
  21. input:close()
  22. input = nil
  23. end
  24. dofile(minetest.get_modpath("throwing").."/functions.lua")
  25. dofile(minetest.get_modpath("throwing").."/tools.lua")
  26. dofile(minetest.get_modpath("throwing").."/standard_arrows.lua")
  27. if minetest.get_modpath('fire') and minetest.get_modpath('bucket') and not DISABLE_FIRE_ARROW then
  28. dofile(minetest.get_modpath("throwing").."/fire_arrow.lua")
  29. end
  30. if not DISABLE_TELEPORT_ARROW then
  31. dofile(minetest.get_modpath("throwing").."/teleport_arrow.lua")
  32. end
  33. if minetest.get_modpath('fire') and minetest.get_modpath('tnt') and not DISABLE_TNT_ARROW then
  34. dofile(minetest.get_modpath("throwing").."/tnt_arrow.lua")
  35. end
  36. if minetest.get_modpath('tnt') and not DISABLE_SHELL_ARROW then
  37. dofile(minetest.get_modpath("throwing").."/shell_arrow.lua")
  38. end
  39. if minetest.get_modpath('tnt') then
  40. dofile(minetest.get_modpath("throwing").."/fireworks_arrows.lua")
  41. end
  42. if minetest.setting_get("log_mods") then
  43. minetest.log("action", "throwing loaded")
  44. end