mirror of
https://github.com/minetest/minetest_game.git
synced 2024-12-22 15:00:18 +01:00
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.
This commit is contained in:
parent
5b3b609270
commit
2696b0cd91
@ -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
|
||||
)
|
||||
|
BIN
mods/stairs/textures/stairs_glass_outer_stairside.png
Normal file
BIN
mods/stairs/textures/stairs_glass_outer_stairside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 169 B |
BIN
mods/stairs/textures/stairs_glass_split.png
Normal file
BIN
mods/stairs/textures/stairs_glass_split.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 162 B |
BIN
mods/stairs/textures/stairs_glass_stairside.png
Normal file
BIN
mods/stairs/textures/stairs_glass_stairside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 167 B |
BIN
mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png
Normal file
BIN
mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
BIN
mods/stairs/textures/stairs_obsidian_glass_split.png
Normal file
BIN
mods/stairs/textures/stairs_obsidian_glass_split.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 129 B |
BIN
mods/stairs/textures/stairs_obsidian_glass_stairside.png
Normal file
BIN
mods/stairs/textures/stairs_obsidian_glass_stairside.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
Loading…
Reference in New Issue
Block a user