mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 06:13:17 -04:00
Merge e19142abf0
into 25a6cd866b
This commit is contained in:
commit
3819fb7d1c
1 changed files with 3 additions and 7 deletions
|
@ -68,14 +68,10 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
|
|||
-- a full block
|
||||
local slabpos = nil
|
||||
local slabnode = nil
|
||||
local p0 = pointed_thing.under
|
||||
local p1 = pointed_thing.above
|
||||
local n0 = minetest.env:get_node(p0)
|
||||
p1 = {x = p1.x, y = p1.y - 1, z = p1.z}
|
||||
local n1 = minetest.env:get_node(p1)
|
||||
if n0.name == "stairs:slab_" .. subname then
|
||||
slabpos = p0
|
||||
slabnode = n0
|
||||
elseif n1.name == "stairs:slab_" .. subname then
|
||||
if n1.name == "stairs:slab_" .. subname then
|
||||
slabpos = p1
|
||||
slabnode = n1
|
||||
end
|
||||
|
@ -95,7 +91,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
|
|||
end
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
||||
-- Otherwise place regularly
|
||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||
end,
|
||||
|
|
Loading…
Add table
Reference in a new issue