init.lua 2.1 KB

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