add luacheck, add github actions luacheck, fix luacheck warnings, remove depreciated files

master
unknown 2022-08-21 21:48:37 -04:00
parent 9ed1567072
commit 08b7f60db9
7 changed files with 50 additions and 11 deletions

18
.github/workflows/luacheck.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: luacheck
on: [push, pull_request]
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 ./

25
.luacheckrc Normal file
View File

@ -0,0 +1,25 @@
unused_args = false
allow_defined_top = true
exclude_files = {".luacheckrc"}
globals = {
"minetest", "core",
--mod provided
"abriflame",
}
read_globals = {
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},
--luac
"math", "table",
-- Builtin
"vector", "ItemStack", "dump", "DIR_DELIM", "VoxelArea", "Settings", "PcgRandom", "VoxelManip", "PseudoRandom",
--mod produced
"default",
}

View File

@ -6,7 +6,7 @@ Coloured flames Minetest mod by Shara RedCat which adds:
1. Ten decorative, non-destructive fire types.
2. A fire starter tool to create them.
Note: This mod depends on [abriglass](https://github.com/Ezhh/abriglass) and will not work without it.
Note: This mod depends on [abriglass](https://github.com/mt-mods/abriglass) and will not work without it.
Crafting

View File

@ -1,3 +0,0 @@
default
fire
abriglass

View File

@ -1 +0,0 @@
Adds coloured fire through use of fire starter tool.

View File

@ -14,9 +14,7 @@ local function smoke(pos, node, clicker, enable)
return
end
local node = minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name
if node ~= "air" or particle ~= 0 then
if minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name ~= "air" or particle ~= 0 then
return
end
@ -106,8 +104,8 @@ minetest.register_tool("abriflame:flint", {
return itemstack
end
local pos = ({x = pointed_thing.under.x,
y = pointed_thing.under.y + 1,
local pos = ({x = pointed_thing.under.x,
y = pointed_thing.under.y + 1,
z = pointed_thing.under.z})
if minetest.get_node(pos).name ~= "air" or

View File

@ -1 +1,3 @@
name = abriflame
name = abriflame
depends = default, fire, abriglass
description = Adds coloured fire through use of fire starter tool.