Compare commits

...

4 Commits

Author SHA1 Message Date
b9cb4871a8 Merge remote-tracking branch 'upstream/master' 2023-06-05 23:58:51 +02:00
David Leal
92a1e0cddb Add LuaCheck and GitHub workflow (#32) 2023-01-15 14:17:54 +01:00
b8943369c6 Merge remote-tracking branch 'upstream/master' 2021-02-23 21:15:44 +01:00
SmallJoker
f566d0ff26 Use inventory_image for nodes without tiles for particles 2021-02-18 19:05:12 +01:00
3 changed files with 32 additions and 2 deletions

11
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
on: [push, pull_request]
name: build
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: lint
uses: Roang-zero1/factorio-mod-luacheck@master
with:
luacheckrc_url: ""

19
.luacheckrc Normal file
View File

@@ -0,0 +1,19 @@
allow_defined_top = true
unused_args = false
max_line_length = false
read_globals = {
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},
"player_monoids",
"playerphysics",
"hb",
"vector",
"hunger_ng",
}
globals = {
"minetest",
"hbhunger"
}

View File

@@ -133,8 +133,8 @@ local function is_walkable(ground)
end
local function create_particles(player, name, ground)
local def = minetest.registered_nodes[ground.name]
local tile = def.tiles[1] or def.inventory_image
local def = minetest.registered_nodes[ground.name] or {}
local tile = def.tiles and def.tiles[1] or def.inventory_image
if type(tile) == "table" then
tile = tile.name
end