diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9d468e2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: build +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + + - run: | + sudo apt-get update -qq + sudo apt-get install -qqq luarocks + - name: Install pre-commit + run: pip3 install pre-commit + + - name: Install LuaCheck + run: luarocks install --local luacheck + + - name: Run LuaCheck using pre-commit + run: | + pre-commit run --all-files + $HOME/.luarocks/bin/luacheck . diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 32a776a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -dist: bionic -language: python - -python: - - 3.7.1 - -install: - - sudo apt-get update -qq - - sudo apt-get install -qqq luarocks - - pip3 install pre-commit - - luarocks install --local luacheck - -script: - # All linters are run with pre-commit hooks - - export PATH="$HOME/.luarocks/bin:$PATH" - - pre-commit run --all-files diff --git a/CHANGELOG.md b/CHANGELOG.md index 40316ab..24ef3ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. single node in one chunk. - The same overall ore density is retained in the deep layer. +- Switch to GitHub Actions. + - Benefits include faster responses, easier management, and more. + ## [2.1.0] - 2021-06-28 ### Added diff --git a/init.lua b/init.lua index 6300353..0681338 100644 --- a/init.lua +++ b/init.lua @@ -197,18 +197,22 @@ local function add_ore(modname, description, mineral_name, oredef) if tool_name == "sword" then tdef.description = S("@1 Sword", S(description)) + tdef.groups = {sword = 1} end if tool_name == "pick" then tdef.description = S("@1 Pickaxe", S(description)) + tdef.groups = {pickaxe = 1} end if tool_name == "axe" then tdef.description = S("@1 Axe", S(description)) + tdef.groups = {axe = 1} end if tool_name == "shovel" then tdef.description = S("@1 Shovel", S(description)) + tdef.groups = {shovel = 1} tdef.wield_image = toolimg_base .. tool_name .. ".png^[transformR90" end @@ -216,6 +220,7 @@ local function add_ore(modname, description, mineral_name, oredef) if tool_name == "hoe" and minetest.get_modpath("farming") then tdef.max_uses = tooldef.max_uses + tdef.material = ingot tdef.description = S("@1 Hoe", S(description)) farming.register_hoe(fulltool_name, tdef) end