mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-24 00:49:34 +01:00
Reveal liquid help when taking/placing by bucket
This commit is contained in:
parent
712f295edc
commit
b6426df676
2 changed files with 11 additions and 0 deletions
|
@ -1 +1,2 @@
|
|||
mcl_core
|
||||
doc
|
||||
|
|
|
@ -92,6 +92,9 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
return itemstack
|
||||
end
|
||||
place_liquid(pointed_thing.under, node, source, flowing, fullness)
|
||||
if doc.entry_exists("nodes", source) then
|
||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", source)
|
||||
end
|
||||
else
|
||||
-- not buildable to; place the liquid above
|
||||
-- check if the node above can be replaced
|
||||
|
@ -102,6 +105,9 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
return itemstack
|
||||
end
|
||||
place_liquid(pointed_thing.above, node, source, flowing, fullness)
|
||||
if doc.entry_exists("nodes", source) then
|
||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", source)
|
||||
end
|
||||
else
|
||||
-- do not remove the bucket with the liquid
|
||||
return
|
||||
|
@ -166,6 +172,10 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
|
||||
minetest.add_node(pointed_thing.under, {name="air"})
|
||||
|
||||
if doc.entry_exists("nodes", nn) then
|
||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", nn)
|
||||
end
|
||||
|
||||
elseif nn == "mcl_cauldrons:cauldron_3" then
|
||||
-- Take water out of full cauldron
|
||||
minetest.set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"})
|
||||
|
|
Loading…
Reference in a new issue