init.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --aliases
  2. --minetest.get_modpath("cannabis")
  3. minetest.register_alias("canapa","cannabis:canapa")
  4. --tools
  5. cannabis = {} -- A global Object for the mod
  6. cannabis.path = minetest.get_modpath("cannabis") -- The path of the mod
  7. local path = cannabis.path
  8. -- Get Boilerplate to translate
  9. local S
  10. if(minetest.get_translator) then
  11. S = minetest.get_translator(minetest.get_current_modname())
  12. else
  13. S = function ( s ) return s end
  14. end
  15. cannabis.S = S -- Stores the boilerplate for global access
  16. dofile(path.."/tools.lua")
  17. dofile(path.."/canapa.lua")
  18. dofile(path.."/node_ingot.lua")
  19. dofile(path.."/craftitem.lua")
  20. --dofile(path.."/clothing.lua")
  21. dofile(path.."/joint.lua")
  22. dofile(path.."/canapa_red.lua")
  23. dofile(path.."/craftred.lua")
  24. dofile(path.."/rope.lua")
  25. dofile(path.."/wool.lua")
  26. dofile(path.."/eye_effect.lua")
  27. dofile(path.."/canapa_ice.lua")
  28. dofile(path.."/craftice.lua")
  29. dofile(path.."/armor.lua")
  30. if minetest.get_modpath("3D_armor") then
  31. dofile(path.."/armor.lua")
  32. end
  33. if minetest.get_modpath("clothing") then
  34. dofile(path.."/clothing.lua")
  35. dofile(path.."/clothing_recipes.lua")
  36. end
  37. if minetest.get_modpath("unified_inventory") then
  38. dofile(path.."/bag.lua")
  39. end
  40. if minetest.get_modpath("ropes") then
  41. dofile(path.."/rope.lua")
  42. end