Devtest: Fix missing/incorrect liquid properties (#9955)
authorWuzzy <wuzzy2@mail.ru>
Fri, 29 May 2020 23:46:57 +0000 (01:46 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 23:46:57 +0000 (00:46 +0100)
games/devtest/mods/testnodes/drawtypes.lua
games/devtest/mods/testnodes/textures.lua

index 35fda960f6843cdb6e8729442ce88666a4a78e0b..6bf57fa370b87cf89924770ace12b5d5ed85b96f 100644 (file)
@@ -330,8 +330,7 @@ minetest.register_node("testnodes:plantlike_rooted_degrotate", {
        groups = { dig_immediate = 3 },
 })
 
--- Demonstrative liquid nodes, source and flowing form. This is only the
--- drawtype, no physical liquid properties are used
+-- Demonstrative liquid nodes, source and flowing form.
 minetest.register_node("testnodes:liquid", {
        description = S("Source Liquid Drawtype Test Node"),
        drawtype = "liquid",
@@ -347,6 +346,9 @@ minetest.register_node("testnodes:liquid", {
 
 
        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 },
@@ -367,6 +369,9 @@ minetest.register_node("testnodes:liquid_flowing", {
 
 
        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 },
@@ -387,8 +392,11 @@ minetest.register_node("testnodes:liquid_waving", {
 
 
        walkable = false,
-       liquid_alternative_flowing = "testnodes:liquid_flowing",
-       liquid_alternative_source = "testnodes:liquid",
+       liquidtype = "source",
+       liquid_range = 1,
+       liquid_viscosity = 0,
+       liquid_alternative_flowing = "testnodes:liquid_flowing_waving",
+       liquid_alternative_source = "testnodes:liquid_waving",
        groups = { dig_immediate = 3 },
 })
 minetest.register_node("testnodes:liquid_flowing_waving", {
@@ -408,8 +416,11 @@ minetest.register_node("testnodes:liquid_flowing_waving", {
 
 
        walkable = false,
-       liquid_alternative_flowing = "testnodes:liquid_flowing",
-       liquid_alternative_source = "testnodes:liquid",
+       liquidtype = "flowing",
+       liquid_range = 1,
+       liquid_viscosity = 0,
+       liquid_alternative_flowing = "testnodes:liquid_flowing_waving",
+       liquid_alternative_source = "testnodes:liquid_waving",
        groups = { dig_immediate = 3 },
 })
 
index f5db9ccbf3751710e94f682b54cc8c6dccd21cc1..6ffef8fe935a5e250049a254d28c762821d23778 100644 (file)
@@ -62,6 +62,12 @@ for a=1,#alphas do
                },
                alpha = alpha,
 
+
+               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