forked from VoxeLibre/VoxeLibre
fixes
This commit is contained in:
parent
3c83898095
commit
9b0c87dabc
|
@ -77,6 +77,14 @@ function mcl_cauldrons.get_cauldron_level(pos)
|
|||
return minetest.get_item_group(nn.name, "cauldron")
|
||||
end
|
||||
|
||||
function mcl_cauldrons.add_cauldron_level(pos, type, number)
|
||||
local number = mcl_cauldrons.get_cauldron_level(pos) + number
|
||||
if number > 4 then number = 4 end
|
||||
if number < 1 then number = 1 end
|
||||
mcl_cauldrons.set_cauldron_level(pos, type, number)
|
||||
return number
|
||||
end
|
||||
|
||||
function mcl_cauldrons.is_cauldron(name)
|
||||
return minetest.get_item_group(name, "cauldron") ~= 0
|
||||
end
|
||||
|
@ -153,15 +161,6 @@ function mcl_cauldrons.get_cauldron_string(type, level)
|
|||
end
|
||||
end
|
||||
|
||||
function mcl_cauldrons.add_cauldron_level(pos, type, number)
|
||||
local nn = minetest.get_node(pos).name
|
||||
local number = mcl_cauldrons.get_cauldron_level(pos)+number
|
||||
if number > 4 then number = 4 end
|
||||
if number < 1 then number = 1 end
|
||||
mcl_cauldrons.set_cauldron_level(pos, type, number)
|
||||
return number
|
||||
end
|
||||
|
||||
function mcl_cauldrons.register_cauldron_type(def)
|
||||
for water_level = 1,3 do
|
||||
local id = "mcl_cauldrons:cauldron_"..def.name.."_"..water_level
|
||||
|
|
Loading…
Reference in New Issue