mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 14:23:16 -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
|
-- a full block
|
||||||
local slabpos = nil
|
local slabpos = nil
|
||||||
local slabnode = nil
|
local slabnode = nil
|
||||||
local p0 = pointed_thing.under
|
|
||||||
local p1 = pointed_thing.above
|
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)
|
local n1 = minetest.env:get_node(p1)
|
||||||
if n0.name == "stairs:slab_" .. subname then
|
if n1.name == "stairs:slab_" .. subname then
|
||||||
slabpos = p0
|
|
||||||
slabnode = n0
|
|
||||||
elseif n1.name == "stairs:slab_" .. subname then
|
|
||||||
slabpos = p1
|
slabpos = p1
|
||||||
slabnode = n1
|
slabnode = n1
|
||||||
end
|
end
|
||||||
|
@ -95,7 +91,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Otherwise place regularly
|
-- Otherwise place regularly
|
||||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Add table
Reference in a new issue