Skip to content
Permalink
Browse files

Stairs: Add glass and obsidian glass. Fix slab combine bug

Fix slabs combining into a cube: Facedir is only set for the cube if it has
paramtype2 = "facedir". This avoids liquid appearing in connected
framed glasslike.
  • Loading branch information...
TumeniNodes authored and paramat committed Oct 9, 2018
1 parent 5b3b609 commit 2696b0cd91765f15125c1305133c64c780289aa2
@@ -7,3 +7,18 @@ Authors of source code
Originally by Kahrl <kahrl@gmx.net> (LGPLv2.1+) and
celeron55, Perttu Ahola <celeron55@gmail.com> (LGPLv2.1+)
Various Minetest developers and contributors (LGPLv2.1+)

Authors of media (textures)
---------------------------

Textures
--------
Copyright (c) 2018 Shara RedCat (CC BY-SA 3.0)
stairs_obsidian_glass_outer_stairside.png -- Derived from a texture by PilzAdam (CC BY-SA 3.0)
stairs_obsidian_glass_stairside.png -- Derived from a texture by PilzAdam (CC BY-SA 3.0)

Copyright (c) 2018 TumeniNodes (CC BY-SA 3.0):
stairs_glass_outer_stairside.png -- Derived from a texture by celeron55 (CC BY-SA 3.0)
stairs_glass_stairside.png -- Derived from a texture by celeron55 (CC BY-SA 3.0)
default_glass_split -- Derived from a texture by celeron55 (CC BY-SA 3.0)
default_obsidian_glass_split -- Derived from a texture by PilzAdam (CC BY-SA 3.0)
@@ -211,6 +211,12 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
player_name)
return
end
-- If paramtype2 of cubic version is not 'facedir' set its
-- param2 to 0 to avoid bugs such as liquid in connected
-- framed glass.
if minetest.registered_nodes[recipeitem].paramtype2 ~= "facedir" then
p2 = 0
end
minetest.set_node(pointed_thing.under, {name = recipeitem, param2 = p2})
if not creative_enabled then
itemstack:take_item()
@@ -855,3 +861,97 @@ stairs.register_stair_and_slab(
default.node_sound_snow_defaults(),
true
)

-- Glass stair nodes need to be registered individually to utilize specialized textures.

stairs.register_stair(
"glass",
"default:glass",
{cracky = 3},
{"stairs_glass_split.png", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "stairs_glass_stairside.png",
"default_glass.png", "stairs_glass_split.png"},
"Glass Stair",
default.node_sound_glass_defaults(),
false
)

stairs.register_slab(
"glass",
"default:glass",
{cracky = 3},
{"default_glass.png", "default_glass.png", "stairs_glass_split.png"},
"Glass Slab",
default.node_sound_glass_defaults(),
false
)

stairs.register_stair_inner(
"glass",
"default:glass",
{cracky = 3},
{"stairs_glass_stairside.png^[transformR270", "default_glass.png",
"stairs_glass_stairside.png^[transformFX", "default_glass.png",
"default_glass.png", "stairs_glass_stairside.png"},
"Glass Inner Stair",
default.node_sound_glass_defaults(),
false
)

stairs.register_stair_outer(
"glass",
"default:glass",
{cracky = 3},
{"stairs_glass_stairside.png^[transformR90", "default_glass.png",
"stairs_glass_outer_stairside.png", "stairs_glass_stairside.png",
"stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"},
"Glass Outer Stair",
default.node_sound_glass_defaults(),
false
)

stairs.register_stair(
"obsidian_glass",
"default:obsidian_glass",
{cracky = 3},
{"stairs_obsidian_glass_split.png", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "stairs_obsidian_glass_stairside.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_split.png"},
"Obsidian Glass Stair",
default.node_sound_glass_defaults(),
false
)

stairs.register_slab(
"obsidian_glass",
"default:obsidian_glass",
{cracky = 3},
{"default_obsidian_glass.png", "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"},
"Obsidian Glass Slab",
default.node_sound_glass_defaults(),
false
)

stairs.register_stair_inner(
"obsidian_glass",
"default:obsidian_glass",
{cracky = 3},
{"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png",
"stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png",
"default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"},
"Obsidian Glass Inner Stair",
default.node_sound_glass_defaults(),
false
)

stairs.register_stair_outer(
"obsidian_glass",
"default:obsidian_glass",
{cracky = 3},
{"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png",
"stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png",
"stairs_obsidian_glass_stairside.png^[transformR90","stairs_obsidian_glass_outer_stairside.png"},
"Obsidian Glass Outer Stair",
default.node_sound_glass_defaults(),
false
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 2696b0c

Please sign in to comment.
You can’t perform that action at this time.