Skip to content

Commit b042106

Browse files
TumeniNodesEzhh
authored andcommitted
Stairs: Remove combine slabs code
1 parent f583d90 commit b042106

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

mods/stairs/init.lua

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,6 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
143143
end
144144

145145

146-
-- Slab facedir to placement 6d matching table
147-
local slab_trans_dir = {[0] = 8, 0, 2, 1, 3, 4}
148-
149-
150146
-- Register slab
151147
-- Node will be called stairs:slab_<subname>
152148

@@ -198,32 +194,6 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
198194

199195
local p2 = under.param2
200196

201-
-- combine two slabs if possible
202-
if slab_trans_dir[math.floor(p2 / 4)] == dir
203-
and wield_item == under.name then
204-
205-
if not recipeitem then
206-
return itemstack
207-
end
208-
if minetest.is_protected(pointed_thing.under, player_name) and not
209-
minetest.check_player_privs(player_name, "protection_bypass") then
210-
minetest.record_protection_violation(pointed_thing.under,
211-
player_name)
212-
return
213-
end
214-
-- If paramtype2 of cubic version is not 'facedir' set its
215-
-- param2 to 0 to avoid bugs such as liquid in connected
216-
-- framed glass.
217-
if minetest.registered_nodes[recipeitem].paramtype2 ~= "facedir" then
218-
p2 = 0
219-
end
220-
minetest.set_node(pointed_thing.under, {name = recipeitem, param2 = p2})
221-
if not creative_enabled then
222-
itemstack:take_item()
223-
end
224-
return itemstack
225-
end
226-
227197
-- Placing a slab on an upside down slab should make it right-side up.
228198
if p2 >= 20 and dir == 8 then
229199
p2 = p2 - 20

0 commit comments

Comments
 (0)