diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..980d40a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,11 @@ +on: [push, pull_request] +name: build +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/item_drop/master/.luacheckrc diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..a9c034e --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,19 @@ +unused_args = false +allow_defined_top = true +max_line_length = 999 + +ignore = { + "name", "drops", "i", +} + +globals = { + "minetest", +} + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn"}}, + + "vector", "ItemStack", + "dump", +} diff --git a/README.md b/README.md index 3fa0895..771e82d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,14 @@ -# item_drop +# Item Drop [![](https://github.com/minetest-mods/item_drop/workflows/build/badge.svg)](https://github.com/minetest-mods/item_drop/actions) [![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) + +A highly configurable mod providing item magnet and in-world node drops\ By [PilzAdam](https://github.com/PilzAdam), [texmex](https://github.com/tacotexmex/), [hybriddog](https://github.com/hybriddog/). -## Description -A highly configurable mod providing item magnet and in-world node drops - ## Licensing LGPLv2.1/CC BY-SA 3.0. Particle code from WCILA mod by Aurailus, originally licensed MIT. ## Notes -item_drop can be played with Minetest 0.4.16 or above. It was originally +`item_drop` can be played with Minetest 0.4.16 or above. It was originally developed by [PilzAdam](https://github.com/PilzAdam/item_drop). ## List of features diff --git a/init.lua b/init.lua index 280504a..f0d0e00 100644 --- a/init.lua +++ b/init.lua @@ -103,7 +103,7 @@ if legacy_setting_getbool("item_drop.enable_item_pickup", if pickup_particle then local item = minetest.registered_nodes[ ent.itemstring:gsub("(.*)%s.*$", "%1")] - local image = "" + local image if item and item.tiles and item.tiles[1] then if inventorycube_drawtypes[item.drawtype] then local tiles = item.tiles