1
0

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.
Dieser Commit ist enthalten in:
John Cole
2016-07-12 15:49:43 -04:00
committet von Auke Kok
Ursprung db93277a98
Commit 26a5273dd6
5 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@@ -48,7 +48,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields)
def.on_place = minetest.rotate_node
def.description = ("%s (%d/16)"):format(desc_base, num)
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
end
minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)