made river water flow less and added river water buckets

This commit is contained in:
kaadmy 2015-09-26 16:46:48 -07:00
parent 58e2853bf6
commit 77c2230cdc
4 changed files with 54 additions and 2 deletions

View File

@ -714,11 +714,45 @@ minetest.register_craftitem(
end
})
minetest.register_craftitem(
"default:bucket_river_water",
{
description = "River Water Bucket",
inventory_image = "default_bucket_river_water.png",
stack_max = 1,
wield_scale = {x=1,y=1,z=2},
liquids_pointable = true,
on_place = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then return end
itemstack:take_item()
local inv=user:get_inventory()
if inv:room_for_item("main", {name="default:bucket"}) then
inv:add_item("main", "default:bucket")
else
local pos = user:getpos()
pos.y = math.floor(pos.y + 0.5)
minetest.add_item(pos, "default:bucket")
end
local pos = pointed_thing.above
if minetest.registered_nodes[minetest.get_node(pointed_thing.under).name].buildable_to then
pos=pointed_thing.under
end
minetest.add_node(pos, {name = "default:river_water_source"})
return itemstack
end
})
minetest.register_craftitem(
"default:bucket",
{
description = "Empty Bucket",
inventory_image = "default_bucket.png",
stack_max = 10,
wield_scale = {x=1,y=1,z=2},
liquids_pointable = true,
on_use = function(itemstack, user, pointed_thing)
@ -739,6 +773,20 @@ minetest.register_craftitem(
minetest.add_item(pos, "default:bucket_water")
end
minetest.remove_node(pointed_thing.under)
elseif nodename == "default:river_water_source" then
itemstack:take_item()
local inv=user:get_inventory()
if inv:room_for_item("main", {name="default:bucket_river_water"}) then
inv:add_item("main", "default:bucket_river_water")
else
local pos = user:getpos()
pos.y = math.floor(pos.y + 0.5)
minetest.add_item(pos, "default:bucket_river_water")
end
minetest.remove_node(pointed_thing.under)
end

View File

@ -692,7 +692,9 @@ minetest.register_node(
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},
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a=40, r=40, g=70, b=100},
groups = {water=1, liquid=1},
})
@ -720,7 +722,9 @@ minetest.register_node(
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},
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a=40, r=40, g=70, b=100},
groups = {water=1, liquid=1},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.