mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-01 07:30:43 +02: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user