aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods
diff options
context:
space:
mode:
Diffstat (limited to 'games/devtest/mods')
-rw-r--r--games/devtest/mods/testnodes/liquids.lua55
-rw-r--r--games/devtest/mods/testnodes/properties.lua108
-rw-r--r--games/devtest/mods/testnodes/textures/testnodes_climbable_resistance_side.pngbin0 -> 295 bytes
-rw-r--r--games/devtest/mods/testnodes/textures/testnodes_move_resistance.pngbin0 -> 221 bytes
4 files changed, 161 insertions, 2 deletions
diff --git a/games/devtest/mods/testnodes/liquids.lua b/games/devtest/mods/testnodes/liquids.lua
index 3d2ea17f5..be33814af 100644
--- a/games/devtest/mods/testnodes/liquids.lua
+++ b/games/devtest/mods/testnodes/liquids.lua
@@ -40,9 +40,11 @@ for d=0, 8 do
liquid_range = d,
})
+ if d <= 7 then
+
local mod = "^[colorize:#000000:127"
minetest.register_node("testnodes:vliquid_"..d, {
- description = "Test Liquid Source, Viscosity "..d,
+ description = "Test Liquid Source, Viscosity/Resistance "..d,
drawtype = "liquid",
tiles = {"testnodes_liquidsource_r"..d..".png"..mod},
special_tiles = {
@@ -61,7 +63,7 @@ for d=0, 8 do
})
minetest.register_node("testnodes:vliquid_flowing_"..d, {
- description = "Flowing Test Liquid, Viscosity "..d,
+ description = "Flowing Test Liquid, Viscosity/Resistance "..d,
drawtype = "flowingliquid",
tiles = {"testnodes_liquidflowing_r"..d..".png"..mod},
special_tiles = {
@@ -80,4 +82,53 @@ for d=0, 8 do
liquid_viscosity = d,
})
+ mod = "^[colorize:#000000:192"
+ local v = 4
+ minetest.register_node("testnodes:vrliquid_"..d, {
+ description = "Test Liquid Source, Viscosity "..v..", Resistance "..d,
+ drawtype = "liquid",
+ tiles = {"testnodes_liquidsource_r"..d..".png"..mod},
+ special_tiles = {
+ {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false},
+ {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true},
+ },
+ use_texture_alpha = "blend",
+ paramtype = "light",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ liquidtype = "source",
+ liquid_alternative_flowing = "testnodes:vrliquid_flowing_"..d,
+ liquid_alternative_source = "testnodes:vrliquid_"..d,
+ liquid_viscosity = v,
+ move_resistance = d,
+ })
+
+ minetest.register_node("testnodes:vrliquid_flowing_"..d, {
+ description = "Flowing Test Liquid, Viscosity "..v..", Resistance "..d,
+ drawtype = "flowingliquid",
+ tiles = {"testnodes_liquidflowing_r"..d..".png"..mod},
+ special_tiles = {
+ {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
+ {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
+ },
+ use_texture_alpha = "blend",
+ paramtype = "light",
+ paramtype2 = "flowingliquid",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ liquidtype = "flowing",
+ liquid_alternative_flowing = "testnodes:vrliquid_flowing_"..d,
+ liquid_alternative_source = "testnodes:vrliquid_"..d,
+ liquid_viscosity = v,
+ move_resistance = d,
+ })
+
+ end
+
end
diff --git a/games/devtest/mods/testnodes/properties.lua b/games/devtest/mods/testnodes/properties.lua
index a52cd1d6f..51f703d7c 100644
--- a/games/devtest/mods/testnodes/properties.lua
+++ b/games/devtest/mods/testnodes/properties.lua
@@ -152,6 +152,66 @@ minetest.register_node("testnodes:liquidflowing_nojump", {
post_effect_color = {a = 70, r = 255, g = 0, b = 200},
})
+-- A liquid which doesn't have liquid movement physics (source variant)
+minetest.register_node("testnodes:liquid_noswim", {
+ description = S("No-swim Liquid Source Node"),
+ liquidtype = "source",
+ liquid_range = 1,
+ liquid_viscosity = 0,
+ liquid_alternative_flowing = "testnodes:liquidflowing_noswim",
+ liquid_alternative_source = "testnodes:liquid_noswim",
+ liquid_renewable = false,
+ liquid_move_physics = false,
+ groups = {dig_immediate=3},
+ walkable = false,
+
+ drawtype = "liquid",
+ tiles = {"testnodes_liquidsource.png^[colorize:#FF00FF:127"},
+ special_tiles = {
+ {name = "testnodes_liquidsource.png^[colorize:#FF00FF:127", backface_culling = false},
+ {name = "testnodes_liquidsource.png^[colorize:#FF00FF:127", backface_culling = true},
+ },
+ use_texture_alpha = "blend",
+ paramtype = "light",
+ pointable = false,
+ liquids_pointable = true,
+ buildable_to = true,
+ is_ground_content = false,
+ post_effect_color = {a = 70, r = 255, g = 200, b = 200},
+})
+
+-- A liquid which doen't have liquid movement physics (flowing variant)
+minetest.register_node("testnodes:liquidflowing_noswim", {
+ description = S("No-swim Flowing Liquid Node"),
+ liquidtype = "flowing",
+ liquid_range = 1,
+ liquid_viscosity = 0,
+ liquid_alternative_flowing = "testnodes:liquidflowing_noswim",
+ liquid_alternative_source = "testnodes:liquid_noswim",
+ liquid_renewable = false,
+ liquid_move_physics = false,
+ groups = {dig_immediate=3},
+ walkable = false,
+
+
+ drawtype = "flowingliquid",
+ tiles = {"testnodes_liquidflowing.png^[colorize:#FF00FF:127"},
+ special_tiles = {
+ {name = "testnodes_liquidflowing.png^[colorize:#FF00FF:127", backface_culling = false},
+ {name = "testnodes_liquidflowing.png^[colorize:#FF00FF:127", backface_culling = false},
+ },
+ use_texture_alpha = "blend",
+ paramtype = "light",
+ paramtype2 = "flowingliquid",
+ pointable = false,
+ liquids_pointable = true,
+ buildable_to = true,
+ is_ground_content = false,
+ post_effect_color = {a = 70, r = 255, g = 200, b = 200},
+})
+
+
+
-- Nodes that modify fall damage (various damage modifiers)
for i=-100, 100, 25 do
if i ~= 0 then
@@ -216,6 +276,54 @@ for i=1, 5 do
})
end
+-- Move resistance nodes (various resistance levels)
+for r=0, 7 do
+ if r > 0 then
+ minetest.register_node("testnodes:move_resistance"..r, {
+ description = S("Move-resistant Node (@1)", r),
+ walkable = false,
+ move_resistance = r,
+
+ drawtype = "glasslike",
+ paramtype = "light",
+ sunlight_propagates = true,
+ tiles = { "testnodes_move_resistance.png" },
+ is_ground_content = false,
+ groups = { dig_immediate = 3 },
+ color = { b = 0, g = 255, r = math.floor((r/7)*255), a = 255 },
+ })
+ end
+
+ minetest.register_node("testnodes:move_resistance_liquidlike"..r, {
+ description = S("Move-resistant Node, liquidlike (@1)", r),
+ walkable = false,
+ move_resistance = r,
+ liquid_move_physics = true,
+
+ drawtype = "glasslike",
+ paramtype = "light",
+ sunlight_propagates = true,
+ tiles = { "testnodes_move_resistance.png" },
+ is_ground_content = false,
+ groups = { dig_immediate = 3 },
+ color = { b = 255, g = 0, r = math.floor((r/7)*255), a = 255 },
+ })
+end
+
+minetest.register_node("testnodes:climbable_move_resistance_4", {
+ description = S("Climbable Move-resistant Node (4)"),
+ walkable = false,
+ climbable = true,
+ move_resistance = 4,
+
+ drawtype = "glasslike",
+ paramtype = "light",
+ sunlight_propagates = true,
+ tiles = {"testnodes_climbable_resistance_side.png"},
+ is_ground_content = false,
+ groups = { dig_immediate = 3 },
+})
+
-- By placing something on the node, the node itself will be replaced
minetest.register_node("testnodes:buildable_to", {
description = S("Replacable Node"),
diff --git a/games/devtest/mods/testnodes/textures/testnodes_climbable_resistance_side.png b/games/devtest/mods/testnodes/textures/testnodes_climbable_resistance_side.png
new file mode 100644
index 000000000..be01583e6
--- /dev/null
+++ b/games/devtest/mods/testnodes/textures/testnodes_climbable_resistance_side.png
Binary files differ
diff --git a/games/devtest/mods/testnodes/textures/testnodes_move_resistance.png b/games/devtest/mods/testnodes/textures/testnodes_move_resistance.png
new file mode 100644
index 000000000..cac3944bf
--- /dev/null
+++ b/games/devtest/mods/testnodes/textures/testnodes_move_resistance.png
Binary files differ