diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index ed9e4f7..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Based on https://gist.github.com/domenic/ec8b0fc8ab45f39403dd -name: Documentation - -on: - pull_request: # Build on pull requests to ensure they don't break docs. - branches: - - master - push: # We'll only push new docs when master is updated (see below). - branches: - - master - -jobs: - build: - name: Build Docs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Lua - uses: leafo/gh-actions-lua@v8 - with: - luaVersion: 5.4 - - name: Setup Lua Rocks - uses: leafo/gh-actions-luarocks@v4 - - name: Setup and run ldoc - run: bash ./doc/install_and_build_docs - - name: Deploy - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./doc/out diff --git a/init.lua b/init.lua index 238ed4d..4ced3bb 100644 --- a/init.lua +++ b/init.lua @@ -61,12 +61,12 @@ local modpath = minetest.get_modpath("mtul_cpml") local loaded_modules = {} local old_require = require --just in case require is present (aka it's an insecure environment) local ie = minetest.request_insecure_environment() -local old_package_path --if require isn't present, allow us to load the modules through hackish means --there's like 100s of require calls, it'd be insane to replace them. If you're farmiliar with require, the goal should be obvious. --modules is the path to modules +local old_package_path if not ie then --if an insecure environment cannot be loaded, then we basically change how require works temporarily, so modules (which is referenced in all CPML files on require() has to be changed) modules = modpath.."/modules/"