forked from VoxeLibre/VoxeLibre
Soften bucket dependencies
This commit is contained in:
parent
bf86ec6d43
commit
34b89b05bc
|
@ -1,2 +1,2 @@
|
||||||
mcl_core
|
mcl_core?
|
||||||
doc
|
doc?
|
||||||
|
|
|
@ -7,13 +7,18 @@ minetest.register_alias("bucket", "bucket:bucket_empty")
|
||||||
minetest.register_alias("bucket_water", "bucket:bucket_water")
|
minetest.register_alias("bucket_water", "bucket:bucket_water")
|
||||||
minetest.register_alias("bucket_lava", "bucket:bucket_lava")
|
minetest.register_alias("bucket_lava", "bucket:bucket_lava")
|
||||||
|
|
||||||
minetest.register_craft({
|
local mod_doc = minetest.get_modpath("doc")
|
||||||
|
local mod_mcl_core = minetest.get_modpath("mcl_core")
|
||||||
|
|
||||||
|
if mod_mcl_core then
|
||||||
|
minetest.register_craft({
|
||||||
output = 'bucket:bucket_empty 1',
|
output = 'bucket:bucket_empty 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'mcl_core:iron_ingot', '', 'mcl_core:iron_ingot'},
|
{'mcl_core:iron_ingot', '', 'mcl_core:iron_ingot'},
|
||||||
{'', 'mcl_core:iron_ingot', ''},
|
{'', 'mcl_core:iron_ingot', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
bucket = {}
|
bucket = {}
|
||||||
bucket.liquids = {}
|
bucket.liquids = {}
|
||||||
|
@ -110,7 +115,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
place_liquid(pointed_thing.under, node, source, flowing, fullness)
|
place_liquid(pointed_thing.under, node, source, flowing, fullness)
|
||||||
if doc.entry_exists("nodes", source) then
|
if mod_doc and doc.entry_exists("nodes", source) then
|
||||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", source)
|
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", source)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -123,7 +128,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
place_liquid(pointed_thing.above, node, source, flowing, fullness)
|
place_liquid(pointed_thing.above, node, source, flowing, fullness)
|
||||||
if doc.entry_exists("nodes", source) then
|
if mod_doc and doc.entry_exists("nodes", source) then
|
||||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", source)
|
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", source)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
@ -194,7 +199,7 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||||
minetest.add_node(pointed_thing.under, {name="air"})
|
minetest.add_node(pointed_thing.under, {name="air"})
|
||||||
sound_take(nn, pointed_thing.under)
|
sound_take(nn, pointed_thing.under)
|
||||||
|
|
||||||
if doc.entry_exists("nodes", nn) then
|
if mod_doc and doc.entry_exists("nodes", nn) then
|
||||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", nn)
|
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", nn)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -228,7 +233,8 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
bucket.register_liquid(
|
if mod_mcl_ore then
|
||||||
|
bucket.register_liquid(
|
||||||
"mcl_core:water_source",
|
"mcl_core:water_source",
|
||||||
"mcl_core:water_flowing",
|
"mcl_core:water_flowing",
|
||||||
"bucket:bucket_water",
|
"bucket:bucket_water",
|
||||||
|
@ -236,9 +242,9 @@ bucket.register_liquid(
|
||||||
"Water Bucket",
|
"Water Bucket",
|
||||||
"A bucket can be used to collect and release liquids. This one is filled with water.",
|
"A bucket can be used to collect and release liquids. This one is filled with water.",
|
||||||
"Right-click on any block to empty the bucket and put a water source on this spot."
|
"Right-click on any block to empty the bucket and put a water source on this spot."
|
||||||
)
|
)
|
||||||
|
|
||||||
bucket.register_liquid(
|
bucket.register_liquid(
|
||||||
"mcl_core:lava_source",
|
"mcl_core:lava_source",
|
||||||
"mcl_core:lava_flowing",
|
"mcl_core:lava_flowing",
|
||||||
"bucket:bucket_lava",
|
"bucket:bucket_lava",
|
||||||
|
@ -246,7 +252,8 @@ bucket.register_liquid(
|
||||||
"Lava Bucket",
|
"Lava Bucket",
|
||||||
"A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.",
|
"A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.",
|
||||||
"Choose a place where you want to empty the bucket, then get in a safe spot somewhere above it. Be prepared to run away when something goes wrong as the lava will soon start to flow after placing. To empty the bucket (which places a lava source), right-click on your chosen place."
|
"Choose a place where you want to empty the bucket, then get in a safe spot somewhere above it. Be prepared to run away when something goes wrong as the lava will soon start to flow after placing. To empty the bucket (which places a lava source), right-click on your chosen place."
|
||||||
)
|
)
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
|
Loading…
Reference in New Issue