2
0

init.lua 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. modpol = {}
  2. -- ===================================================================
  3. --preoverrides: certain things must be predefined in the global table for them to have effect (or cmd line version defualts are used)
  4. -- ===================================================================
  5. -- ===================================================================
  6. -- currently:
  7. -- --get_script_dir: get modpol_minetest's version of directory
  8. -- -- Persistent storage
  9. -- -- -- must implement modpol.load_storage() and modpol.store_data()
  10. -- -- -- defines the path for the lua file
  11. -- get modpol_minetest's version of directory
  12. modpol.get_script_dir = function()
  13. return minetest.get_modpath("modpol").."/modpol_core"
  14. end
  15. -- TKTK: Implement minetest settingtypes for this... for now, the default is to use minetest mod storage.
  16. -- However, the default for if modpol.lua is called from the cmd line is to use local storage
  17. -- Any other implementation may with to make their own persistent storage file and declare it befoe calling modpol.lua in a similar manner
  18. -- works with cmd line: "/storage/storage-local.lua", works with Minetest 5.0 and up: "/storage/storage-mod_storage.lua"
  19. modpol.storage_file_path = minetest.get_modpath("modpol").."/modpol_minetest/storage/storage-mod_storage.lua"
  20. -- ===================================================================
  21. -- /init.lua
  22. -- Modular Politics (modpol) for Minetest
  23. -- TKTK Maybe make this just a quick ref file and locate MT files elsewhere?
  24. -- TKTK need to add player to orgs.instance with on_joinplayer
  25. -- ===================================================================
  26. -- Load modpol system
  27. dofile(minetest.get_modpath("modpol") .. "/modpol_core/modpol.lua")
  28. -- ===================================================================
  29. -- Modular Politics Minetest Specific Code
  30. -- ===================================================================
  31. dofile(minetest.get_modpath("modpol") .. "/modpol_minetest/api.lua")
  32. -- ===================================================================
  33. -- End of file.