diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..ab89da0 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,29 @@ +unused_args = false +-- allow_defined_top = true + +globals = { + "minetest", + "auroras", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", + "ItemStack", + "dump", + "DIR_DELIM", + "VoxelArea", + "Settings", + "PerlinNoise", + + -- MTG + "default", + "sfinv", + "creative", + + -- Mods + "climate_api", +} diff --git a/init.lua b/init.lua index fa67c91..f4c92ee 100644 --- a/init.lua +++ b/init.lua @@ -178,7 +178,7 @@ function auroras.init_colors() if auroras.COLOR_LUT == nil then auroras.COLOR_LUT = {} local idx = 0 - for i, hexCol in pairs(auroras.COLORS) do + for _, hexCol in pairs(auroras.COLORS) do local tCol = auroras.parse_hex_color(hexCol) if tCol ~= nil then auroras.COLOR_LUT[idx] = tCol