]> git.lizzy.rs Git - minetest.git/blobdiff - games/devtest/mods/testnodes/drawtypes.lua
DevTest: Explain purpose of most items in tooltips (#12833)
[minetest.git] / games / devtest / mods / testnodes / drawtypes.lua
index 35fda960f6843cdb6e8729442ce88666a4a78e0b..0ad65f761a22d0d65a4d5def18cc02d64252875d 100644 (file)
@@ -15,25 +15,10 @@ testing this node easier and more convenient.
 
 local S = minetest.get_translator("testnodes")
 
--- If set to true, will show an inventory image for nodes that have no inventory image as of Minetest 5.1.0.
--- This is due to <https://github.com/minetest/minetest/issues/9209>.
--- This is only added to make the items more visible to avoid confusion, but you will no longer see
--- the default inventory images for these items. When you want to test the default inventory image of drawtypes,
--- this should be turned off.
--- TODO: Remove support for fallback inventory image as soon #9209 is fixed.
-local SHOW_FALLBACK_IMAGE = minetest.settings:get_bool("testnodes_show_fallback_image", false)
-
-local fallback_image = function(img)
-       if SHOW_FALLBACK_IMAGE then
-               return img
-       else
-               return nil
-       end
-end
-
 -- A regular cube
 minetest.register_node("testnodes:normal", {
-       description = S("Normal Drawtype Test Node"),
+       description = S("\"normal\" Drawtype Test Node").."\n"..
+               S("Opaque texture"),
        drawtype = "normal",
        tiles = { "testnodes_normal.png" },
 
@@ -42,7 +27,8 @@ minetest.register_node("testnodes:normal", {
 
 -- Standard glasslike node
 minetest.register_node("testnodes:glasslike", {
-       description = S("Glasslike Drawtype Test Node"),
+       description = S("\"glasslike\" Drawtype Test Node").."\n"..
+               S("Transparent node with hidden backfaces"),
        drawtype = "glasslike",
        paramtype = "light",
        tiles = { "testnodes_glasslike.png" },
@@ -52,7 +38,9 @@ minetest.register_node("testnodes:glasslike", {
 
 -- Glasslike framed with the two textures (normal and "detail")
 minetest.register_node("testnodes:glasslike_framed", {
-       description = S("Glasslike Framed Drawtype Test Node"),
+       description = S("\"glasslike_framed\" Drawtype Test Node").."\n"..
+               S("Transparent node with hidden backfaces").."\n"..
+               S("Frame connects to neighbors"),
        drawtype = "glasslike_framed",
        paramtype = "light",
        tiles = {
@@ -69,7 +57,9 @@ minetest.register_node("testnodes:glasslike_framed", {
 -- This node was added to see how the engine behaves when the "detail" texture
 -- is missing.
 minetest.register_node("testnodes:glasslike_framed_no_detail", {
-       description = S("Glasslike Framed without Detail Drawtype Test Node"),
+       description = S("\"glasslike_framed\" Drawtype without Detail Test Node").."\n"..
+               S("Transparent node with hidden backfaces").."\n"..
+               S("Frame connects to neighbors, but the 'detail' tile is not used"),
        drawtype = "glasslike_framed",
        paramtype = "light",
        tiles = { "testnodes_glasslike_framed2.png" },
@@ -81,7 +71,9 @@ minetest.register_node("testnodes:glasslike_framed_no_detail", {
 
 
 minetest.register_node("testnodes:glasslike_framed_optional", {
-       description = S("Glasslike Framed Optional Drawtype Test Node"),
+       description = S("\"glasslike_framed_optional\" Drawtype Test Node").."\n"..
+               S("Transparent node with hidden backfaces").."\n"..
+               S("Frame connects if 'connected_glass' setting is true"),
        drawtype = "glasslike_framed_optional",
        paramtype = "light",
        tiles = {
@@ -97,7 +89,8 @@ minetest.register_node("testnodes:glasslike_framed_optional", {
 
 
 minetest.register_node("testnodes:allfaces", {
-       description = S("Allfaces Drawtype Test Node"),
+       description = S("\"allfaces\" Drawtype Test Node").."\n"..
+               S("Transparent node with visible internal backfaces"),
        drawtype = "allfaces",
        paramtype = "light",
        tiles = { "testnodes_allfaces.png" },
@@ -105,8 +98,15 @@ minetest.register_node("testnodes:allfaces", {
        groups = { dig_immediate = 3 },
 })
 
+local allfaces_optional_tooltip = ""..
+       S("Rendering depends on 'leaves_style' setting:").."\n"..
+       S("* 'fancy': transparent with visible internal backfaces").."\n"..
+       S("* 'simple': transparent with hidden backfaces").."\n"..
+       S("* 'opaque': opaque")
+
 minetest.register_node("testnodes:allfaces_optional", {
-       description = S("Allfaces Optional Drawtype Test Node"),
+       description = S("\"allfaces_optional\" Drawtype Test Node").."\n"..
+               allfaces_optional_tooltip,
        drawtype = "allfaces_optional",
        paramtype = "light",
        tiles = { "testnodes_allfaces_optional.png" },
@@ -115,7 +115,9 @@ minetest.register_node("testnodes:allfaces_optional", {
 })
 
 minetest.register_node("testnodes:allfaces_optional_waving", {
-       description = S("Waving Allfaces Optional Drawtype Test Node"),
+       description = S("Waving \"allfaces_optional\" Drawtype Test Node").."\n"..
+               allfaces_optional_tooltip.."\n"..
+               S("Waves if waving leaves are enabled by client"),
        drawtype = "allfaces_optional",
        paramtype = "light",
        tiles = { "testnodes_allfaces_optional.png^[brighten" },
@@ -125,7 +127,8 @@ minetest.register_node("testnodes:allfaces_optional_waving", {
 })
 
 minetest.register_node("testnodes:firelike", {
-       description = S("Firelike Drawtype Test Node"),
+       description = S("\"firelike\" Drawtype Test Node").."\n"..
+               S("Changes shape based on neighbors"),
        drawtype = "firelike",
        paramtype = "light",
        tiles = { "testnodes_firelike.png" },
@@ -136,7 +139,8 @@ minetest.register_node("testnodes:firelike", {
 })
 
 minetest.register_node("testnodes:fencelike", {
-       description = S("Fencelike Drawtype Test Node"),
+       description = S("\"fencelike\" Drawtype Test Node").."\n"..
+               S("Connects to neighbors"),
        drawtype = "fencelike",
        paramtype = "light",
        tiles = { "testnodes_fencelike.png" },
@@ -145,7 +149,21 @@ minetest.register_node("testnodes:fencelike", {
 })
 
 minetest.register_node("testnodes:torchlike", {
-       description = S("Wallmounted Torchlike Drawtype Test Node"),
+       description = S("Floor \"torchlike\" Drawtype Test Node").."\n"..
+               S("Always on floor"),
+       drawtype = "torchlike",
+       paramtype = "light",
+       tiles = { "testnodes_torchlike_floor.png^[colorize:#FF0000:64" },
+
+
+       walkable = false,
+       sunlight_propagates = true,
+       groups = { dig_immediate = 3 },
+})
+
+minetest.register_node("testnodes:torchlike_wallmounted", {
+       description = S("Wallmounted \"torchlike\" Drawtype Test Node").."\n"..
+               S("param2 = wallmounted rotation (0..5)"),
        drawtype = "torchlike",
        paramtype = "light",
        paramtype2 = "wallmounted",
@@ -159,11 +177,25 @@ minetest.register_node("testnodes:torchlike", {
        walkable = false,
        sunlight_propagates = true,
        groups = { dig_immediate = 3 },
-       inventory_image = fallback_image("testnodes_torchlike_floor.png"),
 })
 
 minetest.register_node("testnodes:signlike", {
-       description = S("Wallmounted Signlike Drawtype Test Node"),
+       description = S("Floor \"signlike\" Drawtype Test Node").."\n"..
+               S("Always on floor"),
+       drawtype = "signlike",
+       paramtype = "light",
+       tiles = { "testnodes_signlike.png^[colorize:#FF0000:64" },
+
+
+       walkable = false,
+       groups = { dig_immediate = 3 },
+       sunlight_propagates = true,
+})
+
+
+minetest.register_node("testnodes:signlike_wallmounted", {
+       description = S("Wallmounted \"signlike\" Drawtype Test Node").."\n"..
+               S("param2 = wallmounted rotation (0..5)"),
        drawtype = "signlike",
        paramtype = "light",
        paramtype2 = "wallmounted",
@@ -173,11 +205,10 @@ minetest.register_node("testnodes:signlike", {
        walkable = false,
        groups = { dig_immediate = 3 },
        sunlight_propagates = true,
-       inventory_image = fallback_image("testnodes_signlike.png"),
 })
 
 minetest.register_node("testnodes:plantlike", {
-       description = S("Plantlike Drawtype Test Node"),
+       description = S("\"plantlike\" Drawtype Test Node"),
        drawtype = "plantlike",
        paramtype = "light",
        tiles = { "testnodes_plantlike.png" },
@@ -189,7 +220,8 @@ minetest.register_node("testnodes:plantlike", {
 })
 
 minetest.register_node("testnodes:plantlike_waving", {
-       description = S("Waving Plantlike Drawtype Test Node"),
+       description = S("Waving \"plantlike\" Drawtype Test Node").."\n"..
+               S("Waves if waving plants are enabled by client"),
        drawtype = "plantlike",
        paramtype = "light",
        tiles = { "testnodes_plantlike_waving.png" },
@@ -201,25 +233,98 @@ minetest.register_node("testnodes:plantlike_waving", {
        groups = { dig_immediate = 3 },
 })
 
+minetest.register_node("testnodes:plantlike_wallmounted", {
+       description = S("Wallmounted \"plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = wallmounted rotation (0..5)"),
+       drawtype = "plantlike",
+       paramtype = "light",
+       paramtype2 = "wallmounted",
+       tiles = { "testnodes_plantlike_wallmounted.png" },
+       leveled = 1,
+
+
+       walkable = false,
+       sunlight_propagates = true,
+       groups = { dig_immediate = 3 },
+})
 
 
 -- param2 will rotate
+local function rotate_on_rightclick(pos, node, clicker)
+       local def = minetest.registered_nodes[node.name]
+       local aux1 = clicker:get_player_control().aux1
+
+       local deg, deg_max
+       local color, color_mult = 0, 0
+       if def.paramtype2 == "degrotate" then
+               deg = node.param2
+               deg_max = 240
+       elseif def.paramtype2 == "colordegrotate" then
+               -- MSB [3x color, 5x rotation] LSB
+               deg = node.param2 % 2^5
+               deg_max = 24
+               color_mult = 2^5
+               color = math.floor(node.param2 / color_mult)
+       end
+
+       deg = (deg + (aux1 and 10 or 1)) % deg_max
+       node.param2 = color * color_mult + deg
+       minetest.swap_node(pos, node)
+       minetest.chat_send_player(clicker:get_player_name(),
+               "Rotation is now " .. deg .. " / " .. deg_max)
+end
+
 minetest.register_node("testnodes:plantlike_degrotate", {
-       description = S("Degrotate Plantlike Drawtype Test Node"),
+       description = S("Degrotate \"plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = horizontal rotation (0..239)"),
        drawtype = "plantlike",
        paramtype = "light",
        paramtype2 = "degrotate",
        tiles = { "testnodes_plantlike_degrotate.png" },
 
-
+       on_rightclick = rotate_on_rightclick,
+       place_param2 = 7,
        walkable = false,
        sunlight_propagates = true,
        groups = { dig_immediate = 3 },
 })
 
+minetest.register_node("testnodes:mesh_degrotate", {
+       description = S("Degrotate \"mesh\" Drawtype Test Node").."\n"..
+               S("param2 = horizontal rotation (0..239)"),
+       drawtype = "mesh",
+       paramtype = "light",
+       paramtype2 = "degrotate",
+       mesh = "testnodes_ocorner.obj",
+       tiles = { "testnodes_mesh_stripes2.png" },
+
+       on_rightclick = rotate_on_rightclick,
+       place_param2 = 10, -- 15°
+       sunlight_propagates = true,
+       groups = { dig_immediate = 3 },
+})
+
+minetest.register_node("testnodes:mesh_colordegrotate", {
+       description = S("Colordegrotate \"mesh\" Drawtype Test Node").."\n"..
+               S("param2 = color + horizontal rotation (0..23, 32..55, ...)"),
+       drawtype = "mesh",
+       paramtype = "light",
+       paramtype2 = "colordegrotate",
+       palette = "testnodes_palette_facedir.png",
+       mesh = "testnodes_ocorner.obj",
+       tiles = { "testnodes_mesh_stripes3.png" },
+
+       on_rightclick = rotate_on_rightclick,
+       -- color index 1, 1 step (=15°) rotated
+       place_param2 = 1 * 2^5 + 1,
+       sunlight_propagates = true,
+       groups = { dig_immediate = 3 },
+})
+
 -- param2 will change height
 minetest.register_node("testnodes:plantlike_leveled", {
-       description = S("Leveled Plantlike Drawtype Test Node"),
+       description = S("Leveled \"plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = height (0..255)"),
        drawtype = "plantlike",
        paramtype = "light",
        paramtype2 = "leveled",
@@ -237,7 +342,8 @@ minetest.register_node("testnodes:plantlike_leveled", {
 
 -- param2 changes shape
 minetest.register_node("testnodes:plantlike_meshoptions", {
-       description = S("Meshoptions Plantlike Drawtype Test Node"),
+       description = S("Meshoptions \"plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = plant shape"),
        drawtype = "plantlike",
        paramtype = "light",
        paramtype2 = "meshoptions",
@@ -249,7 +355,7 @@ minetest.register_node("testnodes:plantlike_meshoptions", {
 })
 
 minetest.register_node("testnodes:plantlike_rooted", {
-       description = S("Rooted Plantlike Drawtype Test Node"),
+       description = S("\"rooted_plantlike\" Drawtype Test Node"),
        drawtype = "plantlike_rooted",
        paramtype = "light",
        tiles = { "testnodes_plantlike_rooted_base.png" },
@@ -258,8 +364,24 @@ minetest.register_node("testnodes:plantlike_rooted", {
        groups = { dig_immediate = 3 },
 })
 
+minetest.register_node("testnodes:plantlike_rooted_wallmounted", {
+       description = S("Wallmounted \"rooted_plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = wallmounted rotation (0..5)"),
+       drawtype = "plantlike_rooted",
+       paramtype = "light",
+       paramtype2 = "wallmounted",
+       tiles = {
+               "testnodes_plantlike_rooted_base.png",
+               "testnodes_plantlike_rooted_base.png",
+               "testnodes_plantlike_rooted_base_side_wallmounted.png" },
+       special_tiles = { "testnodes_plantlike_rooted_wallmounted.png" },
+
+       groups = { dig_immediate = 3 },
+})
+
 minetest.register_node("testnodes:plantlike_rooted_waving", {
-       description = S("Waving Rooted Plantlike Drawtype Test Node"),
+       description = S("Waving \"rooted_plantlike\" Drawtype Test Node").."\n"..
+               S("Waves if waving plants are enabled by client"),
        drawtype = "plantlike_rooted",
        paramtype = "light",
        tiles = {
@@ -275,7 +397,8 @@ minetest.register_node("testnodes:plantlike_rooted_waving", {
 
 -- param2 changes height
 minetest.register_node("testnodes:plantlike_rooted_leveled", {
-       description = S("Leveled Rooted Plantlike Drawtype Test Node"),
+       description = S("Leveled \"rooted_plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = height (0..255)"),
        drawtype = "plantlike_rooted",
        paramtype = "light",
        paramtype2 = "leveled",
@@ -296,7 +419,8 @@ minetest.register_node("testnodes:plantlike_rooted_leveled", {
 
 -- param2 changes shape
 minetest.register_node("testnodes:plantlike_rooted_meshoptions", {
-       description = S("Meshoptions Rooted Plantlike Drawtype Test Node"),
+       description = S("Meshoptions \"rooted_plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = plant shape"),
        drawtype = "plantlike_rooted",
        paramtype = "light",
        paramtype2 = "meshoptions",
@@ -314,7 +438,8 @@ minetest.register_node("testnodes:plantlike_rooted_meshoptions", {
 
 -- param2 changes rotation
 minetest.register_node("testnodes:plantlike_rooted_degrotate", {
-       description = S("Degrotate Rooted Plantlike Drawtype Test Node"),
+       description = S("Degrotate \"rooted_plantlike\" Drawtype Test Node").."\n"..
+               S("param2 = horizontal rotation (0..239)"),
        drawtype = "plantlike_rooted",
        paramtype = "light",
        paramtype2 = "degrotate",
@@ -330,107 +455,131 @@ minetest.register_node("testnodes:plantlike_rooted_degrotate", {
        groups = { dig_immediate = 3 },
 })
 
--- Demonstrative liquid nodes, source and flowing form. This is only the
--- drawtype, no physical liquid properties are used
-minetest.register_node("testnodes:liquid", {
-       description = S("Source Liquid Drawtype Test Node"),
-       drawtype = "liquid",
-       paramtype = "light",
-       tiles = {
-               "testnodes_liquidsource.png",
-       },
-       special_tiles = {
-               {name="testnodes_liquidsource.png", backface_culling=false},
-               {name="testnodes_liquidsource.png", backface_culling=true},
-       },
-       use_texture_alpha = true,
-
-
-       walkable = false,
-       liquid_alternative_flowing = "testnodes:liquid_flowing",
-       liquid_alternative_source = "testnodes:liquid",
-       groups = { dig_immediate = 3 },
-})
-minetest.register_node("testnodes:liquid_flowing", {
-       description = S("Flowing Liquid Drawtype Test Node"),
-       drawtype = "flowingliquid",
-       paramtype = "light",
-       paramtype2 = "flowingliquid",
-       tiles = {
-               "testnodes_liquidflowing.png",
-       },
-       special_tiles = {
-               {name="testnodes_liquidflowing.png", backface_culling=false},
-               {name="testnodes_liquidflowing.png", backface_culling=false},
-       },
-       use_texture_alpha = true,
+-- Demonstrative liquid nodes, source and flowing form.
+-- DRAWTYPE ONLY, NO LIQUID PHYSICS!
+-- Liquid ranges 0 to 8
+for r = 0, 8 do
+       minetest.register_node("testnodes:liquid_"..r, {
+               description = S("\"liquid\" Drawtype Test Node, Range @1", r).."\n"..
+                       S("Drawtype only; all liquid physics are disabled"),
+               drawtype = "liquid",
+               paramtype = "light",
+               tiles = {
+                       "testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100",
+               },
+               special_tiles = {
+                       {name="testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false},
+                       {name="testnodes_liquidsource_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=true},
+               },
+               use_texture_alpha = "blend",
+
+
+               walkable = false,
+               liquid_range = r,
+               liquid_viscosity = 0,
+               liquid_alternative_flowing = "testnodes:liquid_flowing_"..r,
+               liquid_alternative_source = "testnodes:liquid_"..r,
+               groups = { dig_immediate = 3 },
+       })
+       minetest.register_node("testnodes:liquid_flowing_"..r, {
+               description = S("\"flowingliquid\" Drawtype Test Node, Range @1", r).."\n"..
+                       S("Drawtype only; all liquid physics are disabled").."\n"..
+                       S("param2 = flowing liquid level"),
+               drawtype = "flowingliquid",
+               paramtype = "light",
+               paramtype2 = "flowingliquid",
+               tiles = {
+                       "testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100",
+               },
+               special_tiles = {
+                       {name="testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false},
+                       {name="testnodes_liquidflowing_r"..r..".png^[colorize:#FFFFFF:100", backface_culling=false},
+               },
+               use_texture_alpha = "blend",
+
+
+               walkable = false,
+               liquid_range = r,
+               liquid_viscosity = 0,
+               liquid_alternative_flowing = "testnodes:liquid_flowing_"..r,
+               liquid_alternative_source = "testnodes:liquid_"..r,
+               groups = { dig_immediate = 3 },
+       })
 
+end
 
-       walkable = false,
-       liquid_alternative_flowing = "testnodes:liquid_flowing",
-       liquid_alternative_source = "testnodes:liquid",
-       groups = { dig_immediate = 3 },
-})
+-- Waving liquid test (drawtype only)
 minetest.register_node("testnodes:liquid_waving", {
-       description = S("Waving Source Liquid Drawtype Test Node"),
+       description = S("Waving \"liquid\" Drawtype Test Node").."\n"..
+               S("Drawtype only; all liquid physics are disabled").."\n"..
+               S("Waves if waving liquids are enabled by client"),
        drawtype = "liquid",
        paramtype = "light",
        tiles = {
-               "testnodes_liquidsource.png^[brighten",
+               "testnodes_liquidsource.png^[colorize:#0000FF:127",
        },
        special_tiles = {
-               {name="testnodes_liquidsource.png^[brighten", backface_culling=false},
-               {name="testnodes_liquidsource.png^[brighten", backface_culling=true},
+               {name="testnodes_liquidsource.png^[colorize:#0000FF:127", backface_culling=false},
+               {name="testnodes_liquidsource.png^[colorize:#0000FF:127", backface_culling=true},
        },
-       use_texture_alpha = true,
+       use_texture_alpha = "blend",
        waving = 3,
 
 
        walkable = false,
-       liquid_alternative_flowing = "testnodes:liquid_flowing",
-       liquid_alternative_source = "testnodes:liquid",
+       liquid_range = 1,
+       liquid_viscosity = 0,
+       liquid_alternative_flowing = "testnodes:liquid_flowing_waving",
+       liquid_alternative_source = "testnodes:liquid_waving",
        groups = { dig_immediate = 3 },
 })
 minetest.register_node("testnodes:liquid_flowing_waving", {
-       description = S("Waving Flowing Liquid Drawtype Test Node"),
+       description = S("Waving \"flowingliquid\" Drawtype Test Node").."\n"..
+               S("Drawtype only; all liquid physics are disabled").."\n"..
+               S("param2 = flowing liquid level").."\n"..
+               S("Waves if waving liquids are enabled by client"),
        drawtype = "flowingliquid",
        paramtype = "light",
        paramtype2 = "flowingliquid",
        tiles = {
-               "testnodes_liquidflowing.png^[brighten",
+               "testnodes_liquidflowing.png^[colorize:#0000FF:127",
        },
        special_tiles = {
-               {name="testnodes_liquidflowing.png^[brighten", backface_culling=false},
-               {name="testnodes_liquidflowing.png^[brighten", backface_culling=false},
+               {name="testnodes_liquidflowing.png^[colorize:#0000FF:127", backface_culling=false},
+               {name="testnodes_liquidflowing.png^[colorize:#0000FF:127", backface_culling=false},
        },
-       use_texture_alpha = true,
+       use_texture_alpha = "blend",
        waving = 3,
 
 
        walkable = false,
-       liquid_alternative_flowing = "testnodes:liquid_flowing",
-       liquid_alternative_source = "testnodes:liquid",
+       liquid_range = 1,
+       liquid_viscosity = 0,
+       liquid_alternative_flowing = "testnodes:liquid_flowing_waving",
+       liquid_alternative_source = "testnodes:liquid_waving",
        groups = { dig_immediate = 3 },
 })
 
-
-
 -- Invisible node
 minetest.register_node("testnodes:airlike", {
-       description = S("Airlike Drawtype Test Node"),
+       description = S("\"airlike\" Drawtype Test Node").."\n"..
+               S("Invisible node").."\n"..
+               S("Inventory/wield image = no_texture_airlike.png"),
        drawtype = "airlike",
        paramtype = "light",
+       -- inventory/wield images are left empty to make sure the 'no texture'
+       -- fallback for airlike nodes is working properly.
 
 
        walkable = false,
        groups = { dig_immediate = 3 },
        sunlight_propagates = true,
-       inventory_image = fallback_image("testnodes_airlike.png"),
 })
 
 -- param2 changes liquid height
 minetest.register_node("testnodes:glassliquid", {
-       description = S("Glasslike Liquid Level Drawtype Test Node"),
+       description = S("\"glasslike_framed\" Drawtype with Liquid Test Node").."\n"..
+               S("param2 = liquid level (0..63)"),
        drawtype = "glasslike_framed",
        paramtype = "light",
        paramtype2 = "glasslikeliquidlevel",
@@ -449,17 +598,18 @@ minetest.register_node("testnodes:glassliquid", {
 -- should connect to nodes of the same "rail type" (=same shape, different
 -- color) only.
 local rails = {
-       { "rail", {"testnodes_rail_straight.png", "testnodes_rail_curved.png", "testnodes_rail_t_junction.png", "testnodes_rail_crossing.png"} },
-       { "line", {"testnodes_line_straight.png", "testnodes_line_curved.png", "testnodes_line_t_junction.png", "testnodes_line_crossing.png"}, },
-       { "street", {"testnodes_street_straight.png", "testnodes_street_curved.png", "testnodes_street_t_junction.png", "testnodes_street_crossing.png"}, },
+       { "rail", {"testnodes_rail_straight.png", "testnodes_rail_curved.png", "testnodes_rail_t_junction.png", "testnodes_rail_crossing.png"}, S("Connects to rails")},
+       { "line", {"testnodes_line_straight.png", "testnodes_line_curved.png", "testnodes_line_t_junction.png", "testnodes_line_crossing.png"}, S("Connects to lines")},
+       { "street", {"testnodes_street_straight.png", "testnodes_street_curved.png", "testnodes_street_t_junction.png", "testnodes_street_crossing.png"}, S("Connects to streets")},
        -- the "groupless" nodes are nodes in which the "connect_to_raillike" group is not set
-       { "groupless", {"testnodes_rail2_straight.png", "testnodes_rail2_curved.png", "testnodes_rail2_t_junction.png", "testnodes_rail2_crossing.png"} },
+       { "groupless", {"testnodes_rail2_straight.png", "testnodes_rail2_curved.png", "testnodes_rail2_t_junction.png", "testnodes_rail2_crossing.png"}, S("Connects to 'groupless' rails") },
 }
 local colors = { "", "cyan", "red" }
 
 for r=1, #rails do
        local id = rails[r][1]
        local tiles = rails[r][2]
+       local tt = rails[r][3]
        local raillike_group
        if id ~= "groupless" then
                raillike_group = minetest.raillike_group(id)
@@ -470,7 +620,8 @@ for r=1, #rails do
                        color = colors[c]
                end
                minetest.register_node("testnodes:raillike_"..id..c, {
-                       description = S("Raillike Drawtype Test Node: @1 @2", id, c),
+                       description = S("\"raillike\" Drawtype Test Node: @1 @2", id, c).."\n"..
+                               tt,
                        drawtype = "raillike",
                        paramtype = "light",
                        tiles = tiles,
@@ -491,27 +642,37 @@ end
 
 
 -- Add visual_scale variants of previous nodes for half and double size
-local scale = function(subname, desc_double, desc_half)
+local scale = function(subname, append)
        local original = "testnodes:"..subname
        local def = table.copy(minetest.registered_items[original])
+       local orig_desc
+       if append and type(append) == "string" then
+               orig_desc = ItemStack(original):get_short_description()
+               orig_desc = orig_desc .. "\n" .. append
+       elseif append ~= false then
+               orig_desc = ItemStack(original):get_description()
+       else
+               orig_desc = ItemStack(original):get_short_description()
+       end
        def.visual_scale = 2.0
-       def.description = desc_double
+       def.description = S("Double-sized @1", orig_desc)
        minetest.register_node("testnodes:"..subname.."_double", def)
        def = table.copy(minetest.registered_items[original])
        def.visual_scale = 0.5
-       def.description = desc_half
+       def.description = S("Half-sized @1", orig_desc)
        minetest.register_node("testnodes:"..subname.."_half", def)
 end
 
-scale("plantlike",
-       S("Double-sized Plantlike Drawtype Test Node"),
-       S("Half-sized Plantlike Drawtype Test Node"))
-scale("torchlike",
-       S("Double-sized Wallmounted Torchlike Drawtype Test Node"),
-       S("Half-sized Wallmounted Torchlike Drawtype Test Node"))
-scale("signlike",
-       S("Double-sized Wallmounted Signlike Drawtype Test Node"),
-       S("Half-sized Wallmounted Signlike Drawtype Test Node"))
-scale("firelike",
-       S("Double-sized Firelike Drawtype Test Node"),
-       S("Half-sized Firelike Drawtype Test Node"))
+local allfaces_newsize_tt = ""..
+       S("Rendering depends on 'leaves_style' setting:").."\n"..
+       S("* 'fancy'/'simple': transparent").."\n"..
+       S("* 'opaque': opaque")
+
+scale("allfaces", S("Transparent node"))
+scale("allfaces_optional", allfaces_newsize_tt)
+scale("allfaces_optional_waving", allfaces_newsize_tt .. "\n" .. S("Waving if waving leaves are enabled by client"))
+scale("plantlike")
+scale("plantlike_wallmounted")
+scale("torchlike_wallmounted")
+scale("signlike_wallmounted")
+scale("firelike")