fix bug and luacheck

This commit is contained in:
flux 2022-06-14 16:32:48 -07:00
parent a2c8e2db8e
commit 38f610a200
1 changed files with 23 additions and 23 deletions

View File

@ -33,7 +33,7 @@ end
local function check_node_validity(node_def) local function check_node_validity(node_def)
if node_def.type ~= "node" then if node_def.type ~= "node" then
error(("cannot register non-node %q w/ stairsplus"):format(node)) error(("cannot register non-node %q w/ stairsplus"):format(node_def.name))
end end
if ( if (
@ -50,7 +50,7 @@ local function check_node_validity(node_def)
node_def.drawtype == "mesh" or node_def.drawtype == "mesh" or
node_def.drawtype == "plantlike_rooted" node_def.drawtype == "plantlike_rooted"
) then ) then
error(("cannot register %q w/ drawtype %q w/ stairsplus"):format(node, node_def.drawtype)) error(("cannot register %q w/ drawtype %q w/ stairsplus"):format(node_def.name, node_def.drawtype))
end end
if ( if (
@ -65,7 +65,7 @@ local function check_node_validity(node_def)
node_def.paramtype2 == "glasslikeliquidlevel" or node_def.paramtype2 == "glasslikeliquidlevel" or
node_def.paramtype2 == "colordegrotate" node_def.paramtype2 == "colordegrotate"
) then ) then
error(("cannot register %q w/ paramtype2 %q w/ stairsplus"):format(node, node_def.paramtype2)) error(("cannot register %q w/ paramtype2 %q w/ stairsplus"):format(node_def.name, node_def.paramtype2))
end end
end end