forked from Mirrorlandia_minetest/minetest
DevTest: Add example nodes for disable_descend
This commit is contained in:
parent
6b3deaa170
commit
8e1af25738
@ -145,6 +145,10 @@ minetest.register_node("testnodes:nojump_walkable", {
|
|||||||
tiles = {"testnodes_nojump_top.png"},
|
tiles = {"testnodes_nojump_top.png"},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local climbable_nodebox = {
|
||||||
|
type = "regular",
|
||||||
|
}
|
||||||
|
|
||||||
-- Climbable up and down with jump and sneak keys
|
-- Climbable up and down with jump and sneak keys
|
||||||
minetest.register_node("testnodes:climbable", {
|
minetest.register_node("testnodes:climbable", {
|
||||||
description = S("Climbable Node").."\n"..
|
description = S("Climbable Node").."\n"..
|
||||||
@ -156,8 +160,10 @@ minetest.register_node("testnodes:climbable", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
tiles ={"testnodes_climbable_side.png"},
|
tiles = {"testnodes_climbable_top.png","testnodes_climbable_top.png","testnodes_climbable_side.png"},
|
||||||
drawtype = "glasslike",
|
use_texture_alpha = "clip",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = climbable_nodebox,
|
||||||
groups = {dig_immediate=3},
|
groups = {dig_immediate=3},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -169,8 +175,39 @@ minetest.register_node("testnodes:climbable_nojump", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
|
|
||||||
groups = {disable_jump=1, dig_immediate=3},
|
groups = {disable_jump=1, dig_immediate=3},
|
||||||
drawtype = "glasslike",
|
drawtype = "nodebox",
|
||||||
tiles ={"testnodes_climbable_nojump_side.png"},
|
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",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
})
|
})
|
||||||
@ -198,7 +235,6 @@ minetest.register_node("testnodes:liquid_nojump", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
pointable = false,
|
pointable = false,
|
||||||
liquids_pointable = true,
|
liquids_pointable = true,
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
post_effect_color = {a = 70, r = 255, g = 0, b = 200},
|
post_effect_color = {a = 70, r = 255, g = 0, b = 200},
|
||||||
})
|
})
|
||||||
@ -228,7 +264,6 @@ minetest.register_node("testnodes:liquidflowing_nojump", {
|
|||||||
paramtype2 = "flowingliquid",
|
paramtype2 = "flowingliquid",
|
||||||
pointable = false,
|
pointable = false,
|
||||||
liquids_pointable = true,
|
liquids_pointable = true,
|
||||||
buildable_to = true,
|
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
post_effect_color = {a = 70, r = 255, g = 0, b = 200},
|
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},
|
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)
|
-- Nodes that modify fall damage (various damage modifiers)
|
||||||
for i=-100, 100, 25 do
|
for i=-100, 100, 25 do
|
||||||
@ -430,10 +518,11 @@ minetest.register_node("testnodes:climbable_move_resistance_4", {
|
|||||||
climbable = true,
|
climbable = true,
|
||||||
move_resistance = 4,
|
move_resistance = 4,
|
||||||
|
|
||||||
drawtype = "glasslike",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
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,
|
is_ground_content = false,
|
||||||
groups = { dig_immediate = 3 },
|
groups = { dig_immediate = 3 },
|
||||||
})
|
})
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 292 B |
Binary file not shown.
After Width: | Height: | Size: 172 B |
Binary file not shown.
After Width: | Height: | Size: 288 B |
Binary file not shown.
After Width: | Height: | Size: 180 B |
Binary file not shown.
After Width: | Height: | Size: 180 B |
Binary file not shown.
After Width: | Height: | Size: 175 B |
Loading…
Reference in New Issue
Block a user