forked from VoxeLibre/VoxeLibre
Reveal liquid help when taking/placing by bucket
This commit is contained in:
parent
712f295edc
commit
b6426df676
|
@ -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 New Issue