From fa911813dbca08c78327ca5403331f4cd6c89d99 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 14 Sep 2024 16:27:59 -0500 Subject: Add luacheck configuration and some minor cleanups --- .luacheckrc | 7 +++++++ init.lua | 12 +++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .luacheckrc diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..0aec898 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,7 @@ +max_line_length = 160 + +read_globals = { + "minetest", + "default", + "doors", +} diff --git a/init.lua b/init.lua index 7b28b84..b35bcd6 100644 --- a/init.lua +++ b/init.lua @@ -60,7 +60,6 @@ minetest.register_node("prefab_redo:concrete_wall", { end end, on_destruct = function(pos) - local node = minetest.get_node(pos) local pos_above = {x = pos.x,y = pos.y + 1,z = pos.z} local node_above = minetest.get_node(pos_above) if node_above.name == "prefab_redo:concrete_wall_upper" then @@ -88,7 +87,6 @@ minetest.register_node("prefab_redo:concrete_wall_upper", { }, connects_to = {"prefab_redo:concrete_wall","prefab_redo:concrete_wall_upper"}, on_destruct = function(pos) - local node = minetest.get_node(pos) local pos_above = {x = pos.x,y = pos.y + 1,z = pos.z} local node_above = minetest.get_node(pos_above) if node_above.name == "prefab_redo:concrete_wall_upper" then @@ -161,9 +159,9 @@ minetest.register_node("prefab_redo:concrete_catwalk",{ node_box = { type = "fixed", fixed = { - {-0.5,-0.5,-0.5,0.5,-0.375,0.5}, - {-0.5,-0.5,-0.0625,-0.4375,0.5,0.0625}, - {0.4433,-0.5,-0.0625,0.5,0.5,0.0625}, + {-0.5,-0.5,-0.5,0.5,-0.375,0.5}, + {-0.5,-0.5,-0.0625,-0.4375,0.5,0.0625}, + {0.4433,-0.5,-0.0625,0.5,0.5,0.0625}, {0.4433,0.4485,-0.5,0.5,0.5,0.5}, {-0.5,0.4485,-0.5,-0.4375,0.5,0.5}, }, @@ -180,8 +178,8 @@ minetest.register_node("prefab_redo:concrete_bench", { node_box = { type = "fixed", fixed = { - {-0.125,-0.5,-0.125,0.125,0.0625,0.125}, - {-0.5,0.0625,-0.3125,0.5,0.1875,0.3125}, + {-0.125,-0.5,-0.125,0.125,0.0625,0.125}, + {-0.5,0.0625,-0.3125,0.5,0.1875,0.3125}, }, }, groups = {cracky = 2}, -- cgit v1.2.3