mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-10-01 01:21:54 +02:00
Changes on slab placement
This commit is contained in:
parent
56f7093834
commit
4e9647fccc
@ -262,8 +262,8 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti
|
|||||||
-- combine two slabs if possible
|
-- combine two slabs if possible
|
||||||
-- Requirements: Same slab material, must be placed on top of lower slab, or on bottom of upper slab
|
-- Requirements: Same slab material, must be placed on top of lower slab, or on bottom of upper slab
|
||||||
if (wield_item == unode.name or (udefs and wield_item == udefs._mcl_other_slab_half)) and
|
if (wield_item == unode.name or (udefs and wield_item == udefs._mcl_other_slab_half)) and
|
||||||
not ((dir.y >= 0 and minetest.get_item_group(under.name, "slab_top") == 1) or
|
not ((dir.y >= 0 and minetest.get_item_group(unode.name, "slab_top") == 1) or
|
||||||
(dir.y <= 0 and minetest.get_item_group(under.name, "slab_top") == 0)) then
|
(dir.y <= 0 and minetest.get_item_group(unode.name, "slab_top") == 0)) then
|
||||||
|
|
||||||
minetest.set_node(under, {name = double_slab, param2 = p2})
|
minetest.set_node(under, {name = double_slab, param2 = p2})
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ function mcl_stairs.register_slab(subname, recipeitem, groups, images, descripti
|
|||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
elseif (wield_item == anode.name or (adefs and adefs._mcl_other_slab_half)) then
|
elseif (wield_item == anode.name or (adefs and wield_item == adefs._mcl_other_slab_half)) then
|
||||||
minetest.set_node(above, {name = double_slab, param2 = p2})
|
minetest.set_node(above, {name = double_slab, param2 = p2})
|
||||||
|
|
||||||
if not creative_enabled then
|
if not creative_enabled then
|
||||||
|
Loading…
Reference in New Issue
Block a user