init.lua 841 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. local path = minetest.get_modpath("mobs")
  2. -- Mobs Api
  3. mobs = {}
  4. mobs.mod = "redo"
  5. mobs.version = "20180808"
  6. -- Intllib
  7. local MP = minetest.get_modpath(minetest.get_current_modname())
  8. local S, NS = dofile(MP .. "/intllib.lua")
  9. mobs.intllib = S
  10. -- CMI support check
  11. local use_cmi = minetest.global_exists("cmi")
  12. -- Invisibility mod check
  13. mobs.invis = {}
  14. if minetest.global_exists("invisibility") then
  15. mobs.invis = invisibility
  16. end
  17. -- creative check
  18. local creative_mode_cache = minetest.settings:get_bool("creative_mode")
  19. function mobs.is_creative(name)
  20. return creative_mode_cache or minetest.check_player_privs(name, {creative = true})
  21. end
  22. -- Mob functions
  23. --dofile(path .. "/functions.lua")
  24. -- Mob API
  25. dofile(path .. "/api.lua")
  26. -- Rideable Mobs
  27. dofile(path .. "/mount.lua")
  28. minetest.log("action", "[MOD] Mobs Redo loaded")