diff options
Diffstat (limited to 'games/devtest/mods/testnodes')
-rw-r--r-- | games/devtest/mods/testnodes/drawtypes.lua | 141 | ||||
-rw-r--r-- | games/devtest/mods/testnodes/light.lua | 6 | ||||
-rw-r--r-- | games/devtest/mods/testnodes/liquids.lua | 16 | ||||
-rw-r--r-- | games/devtest/mods/testnodes/mod.conf | 1 | ||||
-rw-r--r-- | games/devtest/mods/testnodes/nodeboxes.lua | 9 | ||||
-rw-r--r-- | games/devtest/mods/testnodes/properties.lua | 6 | ||||
-rw-r--r-- | games/devtest/mods/testnodes/textures.lua | 18 |
7 files changed, 107 insertions, 90 deletions
diff --git a/games/devtest/mods/testnodes/drawtypes.lua b/games/devtest/mods/testnodes/drawtypes.lua index 6bf57fa37..ff970144d 100644 --- a/games/devtest/mods/testnodes/drawtypes.lua +++ b/games/devtest/mods/testnodes/drawtypes.lua @@ -145,6 +145,23 @@ minetest.register_node("testnodes:fencelike", { }) minetest.register_node("testnodes:torchlike", { + description = S("Torchlike Drawtype Test Node"), + drawtype = "torchlike", + paramtype = "light", + tiles = { + "testnodes_torchlike_floor.png", + "testnodes_torchlike_ceiling.png", + "testnodes_torchlike_wall.png", + }, + + + walkable = false, + sunlight_propagates = true, + groups = { dig_immediate = 3 }, + inventory_image = fallback_image("testnodes_torchlike_floor.png"), +}) + +minetest.register_node("testnodes:torchlike_wallmounted", { description = S("Wallmounted Torchlike Drawtype Test Node"), drawtype = "torchlike", paramtype = "light", @@ -162,6 +179,8 @@ minetest.register_node("testnodes:torchlike", { inventory_image = fallback_image("testnodes_torchlike_floor.png"), }) + + minetest.register_node("testnodes:signlike", { description = S("Wallmounted Signlike Drawtype Test Node"), drawtype = "signlike", @@ -331,68 +350,72 @@ minetest.register_node("testnodes:plantlike_rooted_degrotate", { }) -- Demonstrative liquid nodes, source and flowing form. -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, - liquidtype = "source", - liquid_range = 1, - liquid_viscosity = 0, - 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, +-- DRAWTYPE ONLY, NO LIQUID PHYSICS! +-- 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), + 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("Flowing Liquid Drawtype Test Node, Range @1", r), + 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, - liquidtype = "flowing", - liquid_range = 1, - liquid_viscosity = 0, - 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"), 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, - liquidtype = "source", liquid_range = 1, liquid_viscosity = 0, liquid_alternative_flowing = "testnodes:liquid_flowing_waving", @@ -405,18 +428,17 @@ minetest.register_node("testnodes:liquid_flowing_waving", { 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, - liquidtype = "flowing", liquid_range = 1, liquid_viscosity = 0, liquid_alternative_flowing = "testnodes:liquid_flowing_waving", @@ -424,8 +446,6 @@ minetest.register_node("testnodes:liquid_flowing_waving", { groups = { dig_immediate = 3 }, }) - - -- Invisible node minetest.register_node("testnodes:airlike", { description = S("Airlike Drawtype Test Node"), @@ -514,10 +534,19 @@ local scale = function(subname, desc_double, desc_half) 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("torchlike", +scale("torchlike_wallmounted", S("Double-sized Wallmounted Torchlike Drawtype Test Node"), S("Half-sized Wallmounted Torchlike Drawtype Test Node")) scale("signlike", diff --git a/games/devtest/mods/testnodes/light.lua b/games/devtest/mods/testnodes/light.lua index 94409e83f..8ab4416d9 100644 --- a/games/devtest/mods/testnodes/light.lua +++ b/games/devtest/mods/testnodes/light.lua @@ -22,7 +22,8 @@ end -- Lets light through, but not sunlight, leading to a -- reduction in light level when light passes through minetest.register_node("testnodes:sunlight_filter", { - description = S("Sunlight Filter"), + description = S("Sunlight Filter") .."\n".. + S("Lets light through, but weakens sunlight"), paramtype = "light", @@ -35,7 +36,8 @@ minetest.register_node("testnodes:sunlight_filter", { -- Lets light and sunlight through without obstruction minetest.register_node("testnodes:sunlight_propagator", { - description = S("Sunlight Propagator"), + description = S("Sunlight Propagator") .."\n".. + S("Lets all light through"), paramtype = "light", sunlight_propagates = true, diff --git a/games/devtest/mods/testnodes/liquids.lua b/games/devtest/mods/testnodes/liquids.lua index e316782ad..3d2ea17f5 100644 --- a/games/devtest/mods/testnodes/liquids.lua +++ b/games/devtest/mods/testnodes/liquids.lua @@ -9,11 +9,9 @@ for d=0, 8 do {name = "testnodes_liquidsource_r"..d..".png", backface_culling = false}, {name = "testnodes_liquidsource_r"..d..".png", backface_culling = true}, }, - alpha = 192, + use_texture_alpha = "blend", paramtype = "light", walkable = false, - pointable = false, - diggable = false, buildable_to = true, is_ground_content = false, liquidtype = "source", @@ -30,12 +28,10 @@ for d=0, 8 do {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false}, {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false}, }, - alpha = 192, + use_texture_alpha = "blend", paramtype = "light", paramtype2 = "flowingliquid", walkable = false, - pointable = false, - diggable = false, buildable_to = true, is_ground_content = false, liquidtype = "flowing", @@ -53,11 +49,9 @@ for d=0, 8 do {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false}, {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true}, }, - alpha = 192, + use_texture_alpha = "blend", paramtype = "light", walkable = false, - pointable = false, - diggable = false, buildable_to = true, is_ground_content = false, liquidtype = "source", @@ -74,12 +68,10 @@ for d=0, 8 do {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false}, {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false}, }, - alpha = 192, + use_texture_alpha = "blend", paramtype = "light", paramtype2 = "flowingliquid", walkable = false, - pointable = false, - diggable = false, buildable_to = true, is_ground_content = false, liquidtype = "flowing", diff --git a/games/devtest/mods/testnodes/mod.conf b/games/devtest/mods/testnodes/mod.conf index 4824c6ed0..d894c3452 100644 --- a/games/devtest/mods/testnodes/mod.conf +++ b/games/devtest/mods/testnodes/mod.conf @@ -1,2 +1,3 @@ name = testnodes description = Contains a bunch of basic example nodes for demonstrative purposes, development and testing +depends = stairs diff --git a/games/devtest/mods/testnodes/nodeboxes.lua b/games/devtest/mods/testnodes/nodeboxes.lua index ebd858337..7e966fdce 100644 --- a/games/devtest/mods/testnodes/nodeboxes.lua +++ b/games/devtest/mods/testnodes/nodeboxes.lua @@ -18,7 +18,7 @@ minetest.register_node("testnodes:nodebox_fixed", { -- 50% higher than a regular node minetest.register_node("testnodes:nodebox_overhigh", { - description = S("Overhigh Nodebox Test Node"), + description = S("+50% high Nodebox Test Node"), tiles = {"testnodes_nodebox.png"}, drawtype = "nodebox", paramtype = "light", @@ -30,15 +30,16 @@ minetest.register_node("testnodes:nodebox_overhigh", { groups = {dig_immediate=3}, }) --- 100% higher than a regular node +-- 95% higher than a regular node minetest.register_node("testnodes:nodebox_overhigh2", { - description = S("Double-height Nodebox Test Node"), + description = S("+95% high Nodebox Test Node"), tiles = {"testnodes_nodebox.png"}, drawtype = "nodebox", paramtype = "light", node_box = { type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 1.5, 0.5}, + -- Y max: more is possible, but glitchy + fixed = {-0.5, -0.5, -0.5, 0.5, 1.45, 0.5}, }, groups = {dig_immediate=3}, diff --git a/games/devtest/mods/testnodes/properties.lua b/games/devtest/mods/testnodes/properties.lua index 01846a5f0..a52cd1d6f 100644 --- a/games/devtest/mods/testnodes/properties.lua +++ b/games/devtest/mods/testnodes/properties.lua @@ -114,11 +114,10 @@ minetest.register_node("testnodes:liquid_nojump", { {name = "testnodes_liquidsource.png^[colorize:#FF0000:127", backface_culling = false}, {name = "testnodes_liquidsource.png^[colorize:#FF0000:127", backface_culling = true}, }, - use_texture_alpha = true, + use_texture_alpha = "blend", paramtype = "light", pointable = false, liquids_pointable = true, - diggable = false, buildable_to = true, is_ground_content = false, post_effect_color = {a = 70, r = 255, g = 0, b = 200}, @@ -143,12 +142,11 @@ minetest.register_node("testnodes:liquidflowing_nojump", { {name = "testnodes_liquidflowing.png^[colorize:#FF0000:127", backface_culling = false}, {name = "testnodes_liquidflowing.png^[colorize:#FF0000:127", backface_culling = false}, }, - use_texture_alpha = true, + use_texture_alpha = "blend", paramtype = "light", paramtype2 = "flowingliquid", pointable = false, liquids_pointable = true, - diggable = false, buildable_to = true, is_ground_content = false, post_effect_color = {a = 70, r = 255, g = 0, b = 200}, diff --git a/games/devtest/mods/testnodes/textures.lua b/games/devtest/mods/testnodes/textures.lua index 6ffef8fe9..f6e6a0c2a 100644 --- a/games/devtest/mods/testnodes/textures.lua +++ b/games/devtest/mods/testnodes/textures.lua @@ -46,28 +46,22 @@ for a=1,#alphas do tiles = { "testnodes_alpha"..alpha..".png", }, - use_texture_alpha = true, + use_texture_alpha = "blend", groups = { dig_immediate = 3 }, }) - -- Transparency set via "alpha" parameter + -- Transparency set via texture modifier minetest.register_node("testnodes:alpha_"..alpha, { description = S("Alpha Test Node (@1)", alpha), - -- It seems that only the liquid drawtype supports the alpha parameter - drawtype = "liquid", + drawtype = "glasslike", paramtype = "light", tiles = { - "testnodes_alpha.png", + "testnodes_alpha.png^[opacity:" .. alpha, }, - alpha = alpha, - + use_texture_alpha = "blend", - liquidtype = "source", - liquid_range = 0, - liquid_viscosity = 0, - liquid_alternative_source = "testnodes:alpha_"..alpha, - liquid_alternative_flowing = "testnodes:alpha_"..alpha, groups = { dig_immediate = 3 }, }) end + |