diff --git a/games/devtest/mods/testnodes/properties.lua b/games/devtest/mods/testnodes/properties.lua index c51db810c..6271f0add 100644 --- a/games/devtest/mods/testnodes/properties.lua +++ b/games/devtest/mods/testnodes/properties.lua @@ -145,6 +145,10 @@ minetest.register_node("testnodes:nojump_walkable", { tiles = {"testnodes_nojump_top.png"}, }) +local climbable_nodebox = { + type = "regular", +} + -- Climbable up and down with jump and sneak keys minetest.register_node("testnodes:climbable", { description = S("Climbable Node").."\n".. @@ -156,8 +160,10 @@ minetest.register_node("testnodes:climbable", { paramtype = "light", sunlight_propagates = true, is_ground_content = false, - tiles ={"testnodes_climbable_side.png"}, - drawtype = "glasslike", + tiles = {"testnodes_climbable_top.png","testnodes_climbable_top.png","testnodes_climbable_side.png"}, + use_texture_alpha = "clip", + drawtype = "nodebox", + node_box = climbable_nodebox, groups = {dig_immediate=3}, }) @@ -169,8 +175,39 @@ minetest.register_node("testnodes:climbable_nojump", { walkable = false, groups = {disable_jump=1, dig_immediate=3}, - drawtype = "glasslike", - tiles ={"testnodes_climbable_nojump_side.png"}, + drawtype = "nodebox", + node_box = climbable_nodebox, + tiles = {"testnodes_climbable_nojump_top.png","testnodes_climbable_nojump_top.png","testnodes_climbable_nojump_side.png"}, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, +}) + + +minetest.register_node("testnodes:climbable_nodescend", { + description = S("Upwards-climbable Node"), + climbable = true, + walkable = false, + + groups = {disable_descend=1, dig_immediate=3}, + drawtype = "nodebox", + node_box = climbable_nodebox, + tiles = {"testnodes_climbable_nodescend_top.png","testnodes_climbable_nodescend_top.png","testnodes_climbable_nodescend_side.png"}, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, +}) + +minetest.register_node("testnodes:climbable_nodescend_nojump", { + description = S("Horizontal-only Climbable Node"), + climbable = true, + walkable = false, + + groups = {disable_jump=1, disable_descend=1, dig_immediate=3}, + drawtype = "nodebox", + node_box = climbable_nodebox, + tiles = {"testnodes_climbable_noclimb_top.png","testnodes_climbable_noclimb_top.png","testnodes_climbable_noclimb_side.png"}, + use_texture_alpha = "clip", paramtype = "light", sunlight_propagates = true, }) @@ -198,7 +235,6 @@ minetest.register_node("testnodes:liquid_nojump", { paramtype = "light", pointable = false, liquids_pointable = true, - buildable_to = true, is_ground_content = false, post_effect_color = {a = 70, r = 255, g = 0, b = 200}, }) @@ -228,7 +264,6 @@ minetest.register_node("testnodes:liquidflowing_nojump", { paramtype2 = "flowingliquid", pointable = false, liquids_pointable = true, - buildable_to = true, is_ground_content = false, post_effect_color = {a = 70, r = 255, g = 0, b = 200}, }) @@ -293,7 +328,60 @@ minetest.register_node("testnodes:liquidflowing_noswim", { post_effect_color = {a = 70, r = 255, g = 200, b = 200}, }) +-- A liquid in which you can't actively descend. +-- Note: You'll still descend slowly by doing nothing. +minetest.register_node("testnodes:liquid_nodescend", { + description = S("No-descending Liquid Source Node"), + liquidtype = "source", + liquid_range = 0, + liquid_viscosity = 0, + liquid_alternative_flowing = "testnodes:liquidflowing_nodescend", + liquid_alternative_source = "testnodes:liquid_nodescend", + liquid_renewable = false, + groups = {disable_descend=1, dig_immediate=3}, + walkable = false, + drawtype = "liquid", + tiles = {"testnodes_liquidsource.png^[colorize:#FFFF00:127"}, + special_tiles = { + {name = "testnodes_liquidsource.png^[colorize:#FFFF00:127", backface_culling = false}, + {name = "testnodes_liquidsource.png^[colorize:#FFFF00:127", backface_culling = true}, + }, + use_texture_alpha = "blend", + paramtype = "light", + pointable = false, + liquids_pointable = true, + is_ground_content = false, + post_effect_color = {a = 70, r = 255, g = 255, b = 200}, +}) + +-- A liquid in which you can't actively descend (flowing variant) +minetest.register_node("testnodes:liquidflowing_nodescend", { + description = S("No-descending Flowing Liquid Node"), + liquidtype = "flowing", + liquid_range = 1, + liquid_viscosity = 0, + liquid_alternative_flowing = "testnodes:liquidflowing_nodescend", + liquid_alternative_source = "testnodes:liquid_nodescend", + liquid_renewable = false, + groups = {disable_descend=1, dig_immediate=3}, + walkable = false, + + + drawtype = "flowingliquid", + tiles = {"testnodes_liquidflowing.png^[colorize:#FFFF00:127"}, + special_tiles = { + {name = "testnodes_liquidflowing.png^[colorize:#FFFF00:127", backface_culling = false}, + {name = "testnodes_liquidflowing.png^[colorize:#FFFF00:127", backface_culling = false}, + }, + use_texture_alpha = "blend", + paramtype = "light", + paramtype2 = "flowingliquid", + pointable = false, + liquids_pointable = true, + is_ground_content = false, + post_effect_color = {a = 70, r = 255, g = 255, b = 200}, +}) -- Nodes that modify fall damage (various damage modifiers) for i=-100, 100, 25 do @@ -430,10 +518,11 @@ minetest.register_node("testnodes:climbable_move_resistance_4", { climbable = true, move_resistance = 4, - drawtype = "glasslike", + drawtype = "nodebox", paramtype = "light", sunlight_propagates = true, - tiles = {"testnodes_climbable_resistance_side.png"}, + tiles = {"testnodes_climbable_top.png","testnodes_climbable_top.png","testnodes_climbable_resistance_side.png"}, + use_texture_alpha = "clip", is_ground_content = false, groups = { dig_immediate = 3 }, }) diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_noclimb_side.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_noclimb_side.png new file mode 100644 index 000000000..899f6c355 Binary files /dev/null and b/games/devtest/mods/testnodes/textures/testnodes_climbable_noclimb_side.png differ diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_noclimb_top.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_noclimb_top.png new file mode 100644 index 000000000..f202b576b Binary files /dev/null and b/games/devtest/mods/testnodes/textures/testnodes_climbable_noclimb_top.png differ diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_nodescend_side.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_nodescend_side.png new file mode 100644 index 000000000..d749e506f Binary files /dev/null and b/games/devtest/mods/testnodes/textures/testnodes_climbable_nodescend_side.png differ diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_nodescend_top.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_nodescend_top.png new file mode 100644 index 000000000..17708cfa2 Binary files /dev/null and b/games/devtest/mods/testnodes/textures/testnodes_climbable_nodescend_top.png differ diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_nojump_top.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_nojump_top.png new file mode 100644 index 000000000..160c8b730 Binary files /dev/null and b/games/devtest/mods/testnodes/textures/testnodes_climbable_nojump_top.png differ diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_top.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_top.png new file mode 100644 index 000000000..53d39460c Binary files /dev/null and b/games/devtest/mods/testnodes/textures/testnodes_climbable_top.png differ