forked from VoxeLibre/VoxeLibre
merge beacon-branch into fork beacon branch #7
|
@ -5,7 +5,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
-- TODO: Extinguish fire of burning entities
|
-- TODO: Extinguish fire of burning entities
|
||||||
|
|
||||||
-- Convenience function because the cauldron nodeboxes are very similar
|
-- Convenience function because the cauldron nodeboxes are very similar
|
||||||
local create_cauldron_nodebox = function(water_level)
|
local function create_cauldron_nodebox(water_level)
|
||||||
local floor_y
|
local floor_y
|
||||||
if water_level == 0 then -- empty
|
if water_level == 0 then -- empty
|
||||||
floor_y = -0.1875
|
floor_y = -0.1875
|
||||||
|
@ -36,10 +36,6 @@ local create_cauldron_nodebox = function(water_level)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local cauldron_nodeboxes = {}
|
|
||||||
for w=0,3 do
|
|
||||||
cauldron_nodeboxes[w] = create_cauldron_nodebox(w)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- Empty cauldron
|
-- Empty cauldron
|
||||||
|
@ -55,7 +51,7 @@ minetest.register_node("mcl_cauldrons:cauldron", {
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {pickaxey=1, deco_block=1, cauldron=1},
|
groups = {pickaxey=1, deco_block=1, cauldron=1},
|
||||||
node_box = cauldron_nodeboxes[0],
|
node_box = create_cauldron_nodebox(0),
|
||||||
selection_box = { type = "regular" },
|
selection_box = { type = "regular" },
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_cauldrons_cauldron_inner.png^mcl_cauldrons_cauldron_top.png",
|
"mcl_cauldrons_cauldron_inner.png^mcl_cauldrons_cauldron_top.png",
|
||||||
|
@ -68,7 +64,7 @@ minetest.register_node("mcl_cauldrons:cauldron", {
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Template function for cauldrons with water
|
-- Template function for cauldrons with water
|
||||||
local register_filled_cauldron = function(water_level, description, river_water)
|
local function register_filled_cauldron(water_level, description, river_water)
|
||||||
local id = "mcl_cauldrons:cauldron_"..water_level
|
local id = "mcl_cauldrons:cauldron_"..water_level
|
||||||
local water_tex
|
local water_tex
|
||||||
if river_water then
|
if river_water then
|
||||||
|
@ -85,8 +81,8 @@ local register_filled_cauldron = function(water_level, description, river_water)
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {pickaxey=1, not_in_creative_inventory=1, cauldron=(1+water_level), cauldron_filled=water_level, comparator_signal=water_level},
|
groups = {pickaxey=1, not_in_creative_inventory=1, cauldron=(1+water_level), cauldron_filled=water_level, comparator_signal=water_level},
|
||||||
node_box = cauldron_nodeboxes[water_level],
|
node_box = create_cauldron_nodebox(water_level),
|
||||||
collision_box = cauldron_nodeboxes[0],
|
collision_box = create_cauldron_nodebox(0),
|
||||||
selection_box = { type = "regular" },
|
selection_box = { type = "regular" },
|
||||||
tiles = {
|
tiles = {
|
||||||
"("..water_tex..")^mcl_cauldrons_cauldron_top.png",
|
"("..water_tex..")^mcl_cauldrons_cauldron_top.png",
|
||||||
|
|
Loading…
Reference in New Issue