1
2
3
4
5
6
7
8
9
10
11
..
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
local u = sorcery.lib
sorcery.registry.mk('infusions',false)
sorcery.registry.mk('residue',false)
sorcery.register_potion = function(name,label,desc,color,imgvariant,glow,extra)
local image = 'sorcery_liquid_'..(imgvariant or 'dull')..'.png' ..
'^[multiply:'..tostring(color)..
'^vessels_glass_bottle.png'
sorcery.register.residue.link('sorcery:' .. name, 'vessels:glass_bottle')
local node = {
................................................................................
);
short_description = label;
drawtype = "plantlike";
tiles = {image};
inventory_image = image;
paramtype = "light";
is_ground_content = false;
light_source = 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",
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
..
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
local u = sorcery.lib
sorcery.registry.mk('infusions',false)
sorcery.registry.mk('residue',false)
sorcery.register_potion_tbl = function(tbl) -- :/
return sorcery.register_potion(tbl.name,tbl.label,tbl.desc,tbl.color,tbl.imgvariant,tbl.glow,tbl.extra)
end
sorcery.register_potion = function(name,label,desc,color,imgvariant,glow,extra)
local image = 'sorcery_liquid_'..(imgvariant or 'dull')..'.png' ..
'^[multiply:'..tostring(color)..
'^vessels_glass_bottle.png'
sorcery.register.residue.link('sorcery:' .. name, 'vessels:glass_bottle')
local node = {
................................................................................
);
short_description = label;
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",
|