mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 06:43:45 +01:00
fix mcl_buckets extra_check #1320
parent
ae18ca7602
commit
5df668f6af
@ -92,7 +92,7 @@ function mcl_buckets.register_liquid(def)
|
||||
-- Check if pointing to a buildable node
|
||||
local item = itemstack:get_name()
|
||||
|
||||
if extra_check and extra_check(place_pos, user) == false then
|
||||
if def.extra_check and def.extra_check(place_pos, user) == false then
|
||||
-- Fail placement of liquid
|
||||
elseif minetest.registered_nodes[nn] and minetest.registered_nodes[nn].buildable_to then
|
||||
-- buildable; replace the node
|
||||
|
@ -2,6 +2,20 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||
local mod_mcl_core = minetest.get_modpath("mcl_core")
|
||||
local mod_mclx_core = minetest.get_modpath("mclx_core")
|
||||
|
||||
local sound_place = function(itemname, pos)
|
||||
local def = minetest.registered_nodes[itemname]
|
||||
if def and def.sounds and def.sounds.place then
|
||||
minetest.sound_play(def.sounds.place, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}, true)
|
||||
end
|
||||
end
|
||||
|
||||
local sound_take = function(itemname, pos)
|
||||
local def = minetest.registered_nodes[itemname]
|
||||
if def and def.sounds and def.sounds.dug then
|
||||
minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}, true)
|
||||
end
|
||||
end
|
||||
|
||||
if mod_mcl_core then
|
||||
-- Lava bucket
|
||||
mcl_buckets.register_liquid({
|
||||
|
Loading…
Reference in New Issue
Block a user