Merge pull request 'Water logging mangrove roots with water bucket' (#3499) from anarquimico/MineClone2:water_logged_mangrove_roots into master

Reviewed-on: MineClone2/MineClone2#3499
Reviewed-by: PrairieWind <prairiewind@noreply.git.minetest.land>
This commit is contained in:
PrairieWind 2023-03-02 02:44:52 +00:00
commit 0a93d67814
2 changed files with 11 additions and 1 deletions

View File

@ -171,7 +171,7 @@ local function on_place_bucket(itemstack, user, pointed_thing)
local node = get_node(pos) local node = get_node(pos)
local node_def = registered_nodes[node.name] local node_def = registered_nodes[node.name]
if node_def and node_def.buildable_to or get_item_group(node.name, "cauldron") == 1 then if node_def and node_def.buildable_to or get_item_group(node.name, "cauldron") == 1 or minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then
local result, take_bucket = get_extra_check(bucket_def.extra_check, pos, user) local result, take_bucket = get_extra_check(bucket_def.extra_check, pos, user)
if result then if result then
local node_place = get_node_place(bucket_def.source_place, pos) local node_place = get_node_place(bucket_def.source_place, pos)

View File

@ -65,6 +65,11 @@ if mod_mcl_core then
end end
sound_place("mcl_core:water_source", pos) sound_place("mcl_core:water_source", pos)
return false, true return false, true
-- Put water into mangrove roots
elseif minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then
minetest.set_node(pos, {name="mcl_mangrove:water_logged_roots"})
sound_place("mcl_core:water_source", pos)
return false, true
-- Evaporate water if used in Nether (except on cauldron) -- Evaporate water if used in Nether (except on cauldron)
else else
local dim = mcl_worlds.pos_to_dimension(pos) local dim = mcl_worlds.pos_to_dimension(pos)
@ -99,6 +104,11 @@ if mod_mclx_core then
end end
sound_place("mcl_core:water_source", pos) sound_place("mcl_core:water_source", pos)
return false, true return false, true
-- Put river water into mangrove roots
elseif minetest.get_node(pos).name == "mcl_mangrove:mangrove_roots" then
minetest.set_node(pos, {name="mcl_mangrove:river_water_logged_roots"})
sound_place("mcl_core:water_source", pos)
return false, true
else else
-- Evaporate water if used in Nether (except on cauldron) -- Evaporate water if used in Nether (except on cauldron)
local dim = mcl_worlds.pos_to_dimension(pos) local dim = mcl_worlds.pos_to_dimension(pos)