Skip to content

Commit 0132bfe

Browse files
committedDec 11, 2017
Stairs: Improve inner/outer stair descriptions. Code cleanup
1 parent 2824e4b commit 0132bfe

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed
 

Diff for: ‎mods/stairs/init.lua

+12-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ local function rotate_and_place(itemstack, placer, pointed_thing)
4444
return minetest.item_place(itemstack, placer, pointed_thing, param2)
4545
end
4646

47-
-- Register stairs.
47+
48+
-- Register stair
4849
-- Node will be called stairs:stair_<subname>
4950

5051
function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
@@ -141,7 +142,8 @@ end
141142
-- Slab facedir to placement 6d matching table
142143
local slab_trans_dir = {[0] = 8, 0, 2, 1, 3, 4}
143144

144-
-- Register slabs.
145+
146+
-- Register slab
145147
-- Node will be called stairs:slab_<subname>
146148

147149
function stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
@@ -292,7 +294,8 @@ if replace then
292294
})
293295
end
294296

295-
-- Register stairs.
297+
298+
-- Register inner stair
296299
-- Node will be called stairs:stair_inner_<subname>
297300

298301
function stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds)
@@ -317,7 +320,7 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images, descri
317320
end
318321
groups.stair = 1
319322
minetest.register_node(":stairs:stair_inner_" .. subname, {
320-
description = description .. " Inner",
323+
description = "Inner " .. description,
321324
drawtype = "nodebox",
322325
tiles = stair_images,
323326
paramtype = "light",
@@ -368,7 +371,8 @@ function stairs.register_stair_inner(subname, recipeitem, groups, images, descri
368371
end
369372
end
370373

371-
-- Register stairs.
374+
375+
-- Register outer stair
372376
-- Node will be called stairs:stair_outer_<subname>
373377

374378
function stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds)
@@ -393,7 +397,7 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images, descri
393397
end
394398
groups.stair = 1
395399
minetest.register_node(":stairs:stair_outer_" .. subname, {
396-
description = description .. " Outer",
400+
description = "Outer " .. description,
397401
drawtype = "nodebox",
398402
tiles = stair_images,
399403
paramtype = "light",
@@ -443,6 +447,7 @@ function stairs.register_stair_outer(subname, recipeitem, groups, images, descri
443447
end
444448
end
445449

450+
446451
-- Stair/slab registration function.
447452
-- Nodes will be called stairs:{stair,slab}_<subname>
448453

@@ -453,6 +458,7 @@ function stairs.register_stair_and_slab(subname, recipeitem, groups, images, des
453458
stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds)
454459
end
455460

461+
456462
-- Register default stairs and slabs
457463

458464
stairs.register_stair_and_slab(

0 commit comments

Comments
 (0)
Please sign in to comment.