From: TumeniNodes Date: Tue, 9 Oct 2018 19:44:15 +0000 (-0400) Subject: Stairs: Add glass and obsidian glass. Fix slab combine bug X-Git-Tag: 5.0.0~33 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2696b0cd91765f15125c1305133c64c780289aa2;p=oweals%2Fminetest_game.git 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. --- diff --git a/mods/stairs/README.txt b/mods/stairs/README.txt index c6b8c337..8a3d8ea2 100644 --- a/mods/stairs/README.txt +++ b/mods/stairs/README.txt @@ -7,3 +7,18 @@ Authors of source code Originally by Kahrl (LGPLv2.1+) and celeron55, Perttu Ahola (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) diff --git a/mods/stairs/init.lua b/mods/stairs/init.lua index 59bd0377..53a56e24 100644 --- a/mods/stairs/init.lua +++ b/mods/stairs/init.lua @@ -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 +) diff --git a/mods/stairs/textures/stairs_glass_outer_stairside.png b/mods/stairs/textures/stairs_glass_outer_stairside.png new file mode 100644 index 00000000..f0b94423 Binary files /dev/null and b/mods/stairs/textures/stairs_glass_outer_stairside.png differ diff --git a/mods/stairs/textures/stairs_glass_split.png b/mods/stairs/textures/stairs_glass_split.png new file mode 100644 index 00000000..13ddff3f Binary files /dev/null and b/mods/stairs/textures/stairs_glass_split.png differ diff --git a/mods/stairs/textures/stairs_glass_stairside.png b/mods/stairs/textures/stairs_glass_stairside.png new file mode 100644 index 00000000..49e3034f Binary files /dev/null and b/mods/stairs/textures/stairs_glass_stairside.png differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png b/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png new file mode 100644 index 00000000..979f11e0 Binary files /dev/null and b/mods/stairs/textures/stairs_obsidian_glass_outer_stairside.png differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_split.png b/mods/stairs/textures/stairs_obsidian_glass_split.png new file mode 100644 index 00000000..7647b9b0 Binary files /dev/null and b/mods/stairs/textures/stairs_obsidian_glass_split.png differ diff --git a/mods/stairs/textures/stairs_obsidian_glass_stairside.png b/mods/stairs/textures/stairs_obsidian_glass_stairside.png new file mode 100644 index 00000000..a117cdd2 Binary files /dev/null and b/mods/stairs/textures/stairs_obsidian_glass_stairside.png differ