Minimal: Add river water nodes (#5809)
authorParamat <paramat@users.noreply.github.com>
Wed, 24 May 2017 05:43:17 +0000 (06:43 +0100)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Wed, 24 May 2017 05:43:17 +0000 (07:43 +0200)
Is a base terrain node needed by any core mapgen with sloping rivers.

games/minimal/mods/default/init.lua
games/minimal/mods/default/mapgen.lua
games/minimal/mods/default/textures/default_river_water.png [new file with mode: 0644]

index 7d26f38a0a73b024c5f7c7fb7a08f4676bfbd46a..fcdf93547f32e6f7845b3b1b88705e1f983d0b40 100644 (file)
@@ -992,37 +992,37 @@ minetest.register_node("default:cloud", {
 
 minetest.register_node("default:water_flowing", {
        description = "Water (flowing)",
-       inventory_image = minetest.inventorycube("default_water.png"),
        drawtype = "flowingliquid",
-       tiles ={"default_water.png"},
+       tiles = {"default_water.png"},
        special_tiles = {
-               {name="default_water.png", backface_culling=false},
-               {name="default_water.png", backface_culling=true},
+               {name = "default_water.png", backface_culling = false},
+               {name = "default_water.png", backface_culling = true},
        },
        alpha = WATER_ALPHA,
        paramtype = "light",
+       paramtype2 = "flowingliquid",
        walkable = false,
        pointable = false,
        diggable = false,
        buildable_to = true,
        is_ground_content = false,
+       drop = "",
        drowning = 1,
        liquidtype = "flowing",
        liquid_alternative_flowing = "default:water_flowing",
        liquid_alternative_source = "default:water_source",
        liquid_viscosity = WATER_VISC,
-       post_effect_color = {a=64, r=100, g=100, b=200},
-       groups = {water=3, liquid=3},
+       post_effect_color = {a = 64, r = 100, g = 100, b = 200},
+       groups = {water = 3, liquid = 3},
 })
 
 minetest.register_node("default:water_source", {
        description = "Water",
-       inventory_image = minetest.inventorycube("default_water.png"),
        drawtype = "liquid",
-       tiles ={"default_water.png"},
+       tiles = {"default_water.png"},
        special_tiles = {
                -- New-style water source material (mostly unused)
-               {name="default_water.png", backface_culling=false},
+               {name = "default_water.png", backface_culling = false},
        },
        alpha = WATER_ALPHA,
        paramtype = "light",
@@ -1031,13 +1031,70 @@ minetest.register_node("default:water_source", {
        diggable = false,
        buildable_to = true,
        is_ground_content = false,
+       drop = "",
        drowning = 1,
        liquidtype = "source",
        liquid_alternative_flowing = "default:water_flowing",
        liquid_alternative_source = "default:water_source",
        liquid_viscosity = WATER_VISC,
-       post_effect_color = {a=64, r=100, g=100, b=200},
-       groups = {water=3, liquid=3},
+       post_effect_color = {a = 64, r = 100, g = 100, b = 200},
+       groups = {water = 3, liquid = 3},
+})
+
+minetest.register_node("default:river_water_source", {
+       description = "River Water Source",
+       drawtype = "liquid",
+       tiles = {"default_river_water.png"},
+       special_tiles = {
+               -- New-style water source material (mostly unused)
+               {name = "default_river_water.png", backface_culling = false},
+       },
+       alpha = 160,
+       paramtype = "light",
+       walkable = false,
+       pointable = false,
+       diggable = false,
+       buildable_to = true,
+       is_ground_content = false,
+       drop = "",
+       drowning = 1,
+       liquidtype = "source",
+       liquid_alternative_flowing = "default:river_water_flowing",
+       liquid_alternative_source = "default:river_water_source",
+       liquid_viscosity = 1,
+       liquid_renewable = false,
+       liquid_range = 2,
+       post_effect_color = {a = 103, r = 30, g = 76, b = 90},
+       groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
+})
+
+minetest.register_node("default:river_water_flowing", {
+       description = "Flowing River Water",
+       drawtype = "flowingliquid",
+       tiles = {"default_river_water.png"},
+       special_tiles = {
+               {name = "default_river_water.png", backface_culling = false},
+               {name = "default_river_water.png", backface_culling = true},
+       },
+       alpha = 160,
+       paramtype = "light",
+       paramtype2 = "flowingliquid",
+       walkable = false,
+       pointable = false,
+       diggable = false,
+       buildable_to = true,
+       is_ground_content = false,
+       drop = "",
+       drowning = 1,
+       liquidtype = "flowing",
+       liquid_alternative_flowing = "default:river_water_flowing",
+       liquid_alternative_source = "default:river_water_source",
+       liquid_viscosity = 1,
+       liquid_renewable = false,
+       liquid_range = 2,
+       post_effect_color = {a = 103, r = 30, g = 76, b = 90},
+       groups = {water = 3, liquid = 3, puts_out_fire = 1,
+               not_in_creative_inventory = 1, cools_lava = 1},
 })
 
 minetest.register_node("default:lava_flowing", {
index 65b67dae55a8455ab880f0ae160d5526d64e2000..30a865366caddf7a3dd283320e1a9197687f0a9f 100644 (file)
@@ -8,6 +8,7 @@ minetest.register_alias("mapgen_dirt", "default:dirt")
 minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
 minetest.register_alias("mapgen_sand", "default:sand")
 minetest.register_alias("mapgen_water_source", "default:water_source")
+minetest.register_alias("mapgen_river_water_source", "default:river_water_source")
 minetest.register_alias("mapgen_lava_source", "default:lava_source")
 minetest.register_alias("mapgen_gravel", "default:gravel")
 
diff --git a/games/minimal/mods/default/textures/default_river_water.png b/games/minimal/mods/default/textures/default_river_water.png
new file mode 100644 (file)
index 0000000..3b55c5f
Binary files /dev/null and b/games/minimal/mods/default/textures/default_river_water.png differ