24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
drawtype = "plantlike";
tiles = {image};
inventory_image = image;
paramtype = "light";
is_ground_content = false;
light_source = glow and math.min(minetest.LIGHT_MAX,glow) or 0;
drop = 'sorcery:' .. name;
preserve_metadata = function(pos,node,meta,newstack)
newstack[1]:get_meta():from_table(meta)
end;
walkable = false;
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
};
on_construct = function(pos)
minetest.get_meta(pos):set_string('infotext',label)
................................................................................
}
if extra then for k,v in pairs(extra) do node[k] = v end end
if not node.groups then node.groups = {} end
node.groups.dig_immediate = 3;
node.groups.attached_node = 1;
node.groups.vessel = 1;
node.groups.not_in_creative_inventory = 1;
minetest.register_node("sorcery:"..name, node)
end
sorcery.register_oil = function(name,label,desc,color,imgvariant,extra)
local image = 'xdecor_bowl.png^(sorcery_oil_' .. (imgvariant or 'dull') .. '.png^[colorize:'..tostring(color)..':140)'
sorcery.register.residue.link('sorcery:' .. name, 'xdecor:bowl')
extra.description = label;
extra.inventory_image = image;
|
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
..
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
drawtype = "plantlike";
tiles = {image};
inventory_image = image;
paramtype = "light";
is_ground_content = false;
light_source = glow and math.min(minetest.LIGHT_MAX,glow) or 0;
drop = 'sorcery:' .. name;
walkable = false;
selection_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25}
};
on_construct = function(pos)
minetest.get_meta(pos):set_string('infotext',label)
................................................................................
}
if extra then for k,v in pairs(extra) do node[k] = v end end
if not node.groups then node.groups = {} end
node.groups.dig_immediate = 3;
node.groups.attached_node = 1;
node.groups.vessel = 1;
node.groups.not_in_creative_inventory = 1;
sorcery.lib.node.reg_autopreserve("sorcery:"..name, node)
end
sorcery.register_oil = function(name,label,desc,color,imgvariant,extra)
local image = 'xdecor_bowl.png^(sorcery_oil_' .. (imgvariant or 'dull') .. '.png^[colorize:'..tostring(color)..':140)'
sorcery.register.residue.link('sorcery:' .. name, 'xdecor:bowl')
extra.description = label;
extra.inventory_image = image;
|