mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2024-12-27 03:00:22 +01:00
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:
parent
db93277a98
commit
26a5273dd6
@ -77,7 +77,7 @@ function stairsplus:register_micro(modname, subname, recipeitem, fields)
|
|||||||
def.on_place = minetest.rotate_node
|
def.on_place = minetest.rotate_node
|
||||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
def.groups = stairsplus:prepare_groups(fields.groups)
|
||||||
def.description = desc
|
def.description = desc
|
||||||
if fields.drop and not type(fields.drop) == "table" then
|
if fields.drop and not (type(fields.drop) == "table") then
|
||||||
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
def.drop = modname.. ":micro_" ..fields.drop..alternate
|
||||||
end
|
end
|
||||||
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
|
||||||
|
@ -77,7 +77,7 @@ function stairsplus:register_panel(modname, subname, recipeitem, fields)
|
|||||||
def.on_place = minetest.rotate_node
|
def.on_place = minetest.rotate_node
|
||||||
def.description = desc
|
def.description = desc
|
||||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
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.. ":panel_" ..fields.drop..alternate
|
def.drop = modname.. ":panel_" ..fields.drop..alternate
|
||||||
end
|
end
|
||||||
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
|
minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
|
||||||
|
@ -48,7 +48,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
|||||||
def.on_place = minetest.rotate_node
|
def.on_place = minetest.rotate_node
|
||||||
def.description = ("%s (%d/16)"):format(desc_base, num)
|
def.description = ("%s (%d/16)"):format(desc_base, num)
|
||||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
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.. ":slab_" .. fields.drop .. alternate
|
def.drop = modname.. ":slab_" .. fields.drop .. alternate
|
||||||
end
|
end
|
||||||
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
|
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
|
||||||
|
@ -231,7 +231,7 @@ function stairsplus:register_slope(modname, subname, recipeitem, fields)
|
|||||||
def.on_place = minetest.rotate_node
|
def.on_place = minetest.rotate_node
|
||||||
def.description = desc
|
def.description = desc
|
||||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
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
|
def.drop = modname.. ":slope_" ..fields.drop..alternate
|
||||||
end
|
end
|
||||||
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
|
minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
|
||||||
|
@ -117,7 +117,7 @@ function stairsplus:register_stair(modname, subname, recipeitem, fields)
|
|||||||
def.on_place = minetest.rotate_node
|
def.on_place = minetest.rotate_node
|
||||||
def.description = desc
|
def.description = desc
|
||||||
def.groups = stairsplus:prepare_groups(fields.groups)
|
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 .. ":stair_" .. fields.drop .. alternate
|
def.drop = modname .. ":stair_" .. fields.drop .. alternate
|
||||||
end
|
end
|
||||||
minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
|
minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
|
||||||
|
Loading…
Reference in New Issue
Block a user