|
@@ -17,7 +17,8 @@ local S = minetest.get_translator("testnodes")
|
|
|
|
|
|
-- 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" },
|
|
|
|
|
@@ -26,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" },
|
|
@@ -36,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 = {
|
|
@@ -53,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" },
|
|
@@ -65,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 = {
|
|
@@ -81,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" },
|
|
@@ -89,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" },
|
|
@@ -99,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" },
|
|
@@ -109,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" },
|
|
@@ -120,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" },
|
|
@@ -129,7 +149,8 @@ minetest.register_node("testnodes:fencelike", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:torchlike", {
|
|
|
- description = S("Floor 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" },
|
|
@@ -141,7 +162,8 @@ minetest.register_node("testnodes:torchlike", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:torchlike_wallmounted", {
|
|
|
- description = S("Wallmounted Torchlike Drawtype Test Node"),
|
|
|
+ description = S("Wallmounted \"torchlike\" Drawtype Test Node").."\n"..
|
|
|
+ S("param2 = wallmounted rotation (0..5)"),
|
|
|
drawtype = "torchlike",
|
|
|
paramtype = "light",
|
|
|
paramtype2 = "wallmounted",
|
|
@@ -158,7 +180,8 @@ minetest.register_node("testnodes:torchlike_wallmounted", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:signlike", {
|
|
|
- description = S("Floor 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" },
|
|
@@ -171,7 +194,8 @@ minetest.register_node("testnodes:signlike", {
|
|
|
|
|
|
|
|
|
minetest.register_node("testnodes:signlike_wallmounted", {
|
|
|
- description = S("Wallmounted Signlike Drawtype Test Node"),
|
|
|
+ description = S("Wallmounted \"signlike\" Drawtype Test Node").."\n"..
|
|
|
+ S("param2 = wallmounted rotation (0..5)"),
|
|
|
drawtype = "signlike",
|
|
|
paramtype = "light",
|
|
|
paramtype2 = "wallmounted",
|
|
@@ -184,7 +208,7 @@ minetest.register_node("testnodes:signlike_wallmounted", {
|
|
|
})
|
|
|
|
|
|
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" },
|
|
@@ -196,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" },
|
|
@@ -209,7 +234,8 @@ minetest.register_node("testnodes:plantlike_waving", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:plantlike_wallmounted", {
|
|
|
- description = S("Wallmounted Plantlike Drawtype Test Node"),
|
|
|
+ description = S("Wallmounted \"plantlike\" Drawtype Test Node").."\n"..
|
|
|
+ S("param2 = wallmounted rotation (0..5)"),
|
|
|
drawtype = "plantlike",
|
|
|
paramtype = "light",
|
|
|
paramtype2 = "wallmounted",
|
|
@@ -249,7 +275,8 @@ local function rotate_on_rightclick(pos, node, clicker)
|
|
|
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",
|
|
@@ -263,7 +290,8 @@ minetest.register_node("testnodes:plantlike_degrotate", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:mesh_degrotate", {
|
|
|
- description = S("Degrotate Mesh Drawtype Test Node"),
|
|
|
+ description = S("Degrotate \"mesh\" Drawtype Test Node").."\n"..
|
|
|
+ S("param2 = horizontal rotation (0..239)"),
|
|
|
drawtype = "mesh",
|
|
|
paramtype = "light",
|
|
|
paramtype2 = "degrotate",
|
|
@@ -277,7 +305,8 @@ minetest.register_node("testnodes:mesh_degrotate", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:mesh_colordegrotate", {
|
|
|
- description = S("Color Degrotate Mesh Drawtype Test Node"),
|
|
|
+ description = S("Colordegrotate \"mesh\" Drawtype Test Node").."\n"..
|
|
|
+ S("param2 = color + horizontal rotation (0..23, 32..55, ...)"),
|
|
|
drawtype = "mesh",
|
|
|
paramtype = "light",
|
|
|
paramtype2 = "colordegrotate",
|
|
@@ -294,7 +323,8 @@ minetest.register_node("testnodes:mesh_colordegrotate", {
|
|
|
|
|
|
-- 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",
|
|
@@ -312,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",
|
|
@@ -324,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" },
|
|
@@ -334,7 +365,8 @@ minetest.register_node("testnodes:plantlike_rooted", {
|
|
|
})
|
|
|
|
|
|
minetest.register_node("testnodes:plantlike_rooted_wallmounted", {
|
|
|
- description = S("Wallmounted Rooted Plantlike Drawtype Test Node"),
|
|
|
+ description = S("Wallmounted \"rooted_plantlike\" Drawtype Test Node").."\n"..
|
|
|
+ S("param2 = wallmounted rotation (0..5)"),
|
|
|
drawtype = "plantlike_rooted",
|
|
|
paramtype = "light",
|
|
|
paramtype2 = "wallmounted",
|
|
@@ -348,7 +380,8 @@ minetest.register_node("testnodes:plantlike_rooted_wallmounted", {
|
|
|
})
|
|
|
|
|
|
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 = {
|
|
@@ -364,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",
|
|
@@ -385,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",
|
|
@@ -403,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",
|
|
@@ -424,7 +460,8 @@ minetest.register_node("testnodes:plantlike_rooted_degrotate", {
|
|
|
-- Liquid ranges 0 to 8
|
|
|
for r = 0, 8 do
|
|
|
minetest.register_node("testnodes:liquid_"..r, {
|
|
|
- description = S("Source Liquid Drawtype Test Node, Range @1", r),
|
|
|
+ description = S("\"liquid\" Drawtype Test Node, Range @1", r).."\n"..
|
|
|
+ S("Drawtype only; all liquid physics are disabled"),
|
|
|
drawtype = "liquid",
|
|
|
paramtype = "light",
|
|
|
tiles = {
|
|
@@ -445,7 +482,9 @@ for r = 0, 8 do
|
|
|
groups = { dig_immediate = 3 },
|
|
|
})
|
|
|
minetest.register_node("testnodes:liquid_flowing_"..r, {
|
|
|
- description = S("Flowing Liquid Drawtype Test Node, Range @1", 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",
|
|
@@ -471,7 +510,9 @@ end
|
|
|
|
|
|
-- 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 = {
|
|
@@ -493,7 +534,10 @@ minetest.register_node("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",
|
|
@@ -518,9 +562,13 @@ minetest.register_node("testnodes:liquid_flowing_waving", {
|
|
|
|
|
|
-- 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,
|
|
@@ -530,7 +578,8 @@ minetest.register_node("testnodes:airlike", {
|
|
|
|
|
|
-- 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",
|
|
@@ -549,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)
|
|
@@ -570,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,
|
|
@@ -591,39 +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("allfaces",
|
|
|
- S("Double-sized Allfaces Drawtype Test Node"),
|
|
|
- S("Half-sized Allfaces Drawtype Test Node"))
|
|
|
-scale("allfaces_optional",
|
|
|
- S("Double-sized Allfaces Optional Drawtype Test Node"),
|
|
|
- S("Half-sized Allfaces Optional Drawtype Test Node"))
|
|
|
-scale("allfaces_optional_waving",
|
|
|
- S("Double-sized Waving Allfaces Optional Drawtype Test Node"),
|
|
|
- S("Half-sized Waving Allfaces Optional Drawtype Test Node"))
|
|
|
-scale("plantlike",
|
|
|
- S("Double-sized Plantlike Drawtype Test Node"),
|
|
|
- S("Half-sized Plantlike Drawtype Test Node"))
|
|
|
-scale("plantlike_wallmounted",
|
|
|
- S("Double-sized Wallmounted Plantlike Drawtype Test Node"),
|
|
|
- S("Half-sized Wallmounted Plantlike Drawtype Test Node"))
|
|
|
-scale("torchlike_wallmounted",
|
|
|
- S("Double-sized Wallmounted Torchlike Drawtype Test Node"),
|
|
|
- S("Half-sized Wallmounted Torchlike Drawtype Test Node"))
|
|
|
-scale("signlike_wallmounted",
|
|
|
- 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")
|