diff --git a/mods/default/init.lua b/mods/default/init.lua index 01abda4..417a9f4 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -5,8 +5,12 @@ default = {} +default.RIVER_WATER_ALPHA = 160 +default.RIVER_WATER_VISC = 2 + default.WATER_ALPHA = 200 default.WATER_VISC = 1 + default.LIGHT_MAX = 14 function default.log(text, type) diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index c53339d..66f87a7 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -9,7 +9,7 @@ minetest.register_alias("mapgen_tree", "default:tree") minetest.register_alias("mapgen_leaves", "default:leaves") minetest.register_alias("mapgen_apple", "default:apple") minetest.register_alias("mapgen_water_source", "default:water_source") -minetest.register_alias("mapgen_river_water_source", "default:water_source") +minetest.register_alias("mapgen_river_water_source", "default:river_water_source") minetest.register_alias("mapgen_dirt", "default:dirt") minetest.register_alias("mapgen_sand", "default:sand") minetest.register_alias("mapgen_desert_sand", "default:sand") diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index bf0efb4..e15a514 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -662,6 +662,68 @@ minetest.register_node( groups = {water=1, liquid=1}, }) +minetest.register_node( + "default:river_water_flowing", + { + description = "River Water (flowing)", + inventory_image = minetest.inventorycube("default_water.png"), + drawtype = "flowingliquid", + tiles ={"default_water.png"}, + special_tiles = { + { + image = "default_water_animated.png", + backface_culling=false, + animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.8} + }, + { + image = "default_water_animated.png", + backface_culling=false, + animation={type = "vertical_frames", aspect_w= 16, aspect_h = 16, length = 0.8} + }, + }, + alpha = default.RIVER_WATER_ALPHA, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drowning = 2, + liquidtype = "flowing", + liquid_alternative_flowing = "default:river_water_flowing", + liquid_alternative_source = "default:river_water_source", + liquid_viscosity = default.RIVER_WATER_VISC, + post_effect_color = {a=60, r=40, g=70, b=100}, + groups = {water=1, liquid=1}, + }) + +minetest.register_node( + "default:river_water_source", + { + description = "River Water", + inventory_image = minetest.inventorycube("default_water.png"), + drawtype = "liquid", + tiles ={"default_water.png"}, + special_tiles = { + { + image = "default_river_water.png", + backface_culling=false, + }, + }, + alpha = default.RIVER_WATER_ALPHA, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drowning = 2, + liquidtype = "source", + liquid_alternative_flowing = "default:river_water_flowing", + liquid_alternative_source = "default:river_water_source", + liquid_viscosity = default.RIVER_WATER_VISC, + post_effect_color = {a=60, r=40, g=70, b=100}, + groups = {water=1, liquid=1}, + }) + minetest.register_node( "default:torch_dead", {