Fix drop logic. (#49)

The code

		not type(fields.drop) == "table"

was always false because it compares a boolean with a string,

		not (type(fields.drop) == "table")

is the intended logic.
This commit is contained in:
John Cole
2016-07-12 15:49:43 -04:00
committed by Auke Kok
parent db93277a98
commit 26a5273dd6
5 changed files with 5 additions and 5 deletions

View File

@ -231,7 +231,7 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
def.on_place = minetest.rotate_node
def.description = desc
def.groups = stairsplus:prepare_groups(fields.groups)
if fields.drop and not type(fields.drop) == "table" then
if fields.drop and not (type(fields.drop) == "table") then
def.drop = modname.. ":slope_" ..fields.drop..alternate
end
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)