From bb7821becb61313f0816caef036e3d302132e852 Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Fri, 26 Jun 2020 15:46:54 +0200 Subject: [PATCH] import --- .github/workflows/luacheck.yml | 17 +++++++++++++++++ .luacheckrc | 18 ++++++++++++++++++ init.lua | 7 +++++++ mod.conf | 3 +++ 4 files changed, 45 insertions(+) create mode 100644 .github/workflows/luacheck.yml create mode 100644 .luacheckrc create mode 100644 init.lua create mode 100644 mod.conf diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..a03fe92 --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,17 @@ +name: luacheck + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: apt + run: sudo apt-get install -y luarocks + - name: luacheck install + run: luarocks install --local luacheck + - name: luacheck run + run: $HOME/.luarocks/bin/luacheck ./ diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..174467b --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,18 @@ +allow_defined_top = true + +globals = { + "monitoring", + "minetest", + "replacer" +} + +read_globals = { + -- Stdlib + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Minetest + "vector", "ItemStack", + "dump" + +} diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..1e9d467 --- /dev/null +++ b/init.lua @@ -0,0 +1,7 @@ +if not minetest.get_modpath("replacer") then + return +else + print("[monitoring] replacer extension loaded") +end + +monitoring.wrap_global({"replacer", "replace"}, "replacer_replace") diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..f41fa68 --- /dev/null +++ b/mod.conf @@ -0,0 +1,3 @@ +name = monitoring_replacer +depends = monitoring +optional_depends = replacer