Predefinitions.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. When calling modpol.lua from another file, one may wish to use
  2. different functions than those included by default.
  3. So far, 2 definitions need to be made BEFORE calling modpol.lua, the rest can be overwritten
  4. after calling modpol.lua .
  5. setup:
  6. ----------------
  7. Define the global modpol table:
  8. modpol = {}
  9. the following 2 items *may* be defined, if they are not, then defaults will be used:
  10. ========================
  11. --------------------
  12. modpol.get_script_dir()
  13. --------------------
  14. type: function
  15. defaults to: a function that can only work in linux
  16. usage: must return the file path of the modpol directory. If modpol is in a
  17. larger directory, such as a mod filesystem, make sure that the path returned is the "base"
  18. modpol folder, i.e. the folder with all the original modpol files.
  19. ========================
  20. --------------------
  21. modpol.storage_file_path
  22. --------------------
  23. type: string
  24. defaults to: topdir .. "/storage/storage-local.lua",
  25. where topdir is the directory defined by modpol.storage_file_path
  26. usage: if you wish to use another method of storage than that provided by default,
  27. then you can save a filepath to the storage script here.